Ignore:
Timestamp:
Aug 31, 2020, 5:20:49 PM (15 months ago)
Author:
m3zulfiq <m3zulfiq@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
49a980b
Parents:
b26144d
Message:

Removed a fill bug from alloc interface, changed pervious alloc tests (alloc.cfa) to comply with new alloc interface, added new tests for memory allocation (malloc.cfa and alloc2.cfa).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/stdlib.hfa

    rb26144d r191a190  
    201201                        memset( (char *)ptr + copy_end, (int)Fill.c, Dim * size - copy_end );
    202202                } else if(Fill.tag == 't') {
    203                         for ( int i = copy_end; i <= Dim * size - size ; i += size ) {
     203                        for ( int i = copy_end; i < Dim * size; i += size ) {
    204204                                memcpy( (char *)ptr + i, &Fill.t, size );
    205205                        }
     
    207207                        memcpy( (char *)ptr + copy_end, Fill.at, min(Dim * size - copy_end, Fill.size) );
    208208                } else if(Fill.tag == 'T') {
    209                         for ( int i = copy_end; i <= Dim * size - size ; i += size ) {
     209                        for ( int i = copy_end; i < Dim * size; i += size ) {
    210210                                memcpy( (char *)ptr + i, Fill.at, size );
    211211                        }
Note: See TracChangeset for help on using the changeset viewer.