Ignore:
Timestamp:
Feb 7, 2016, 7:47:38 PM (8 years ago)
Author:
alain
Message:

Fixing two bugs:
1) In the string library: the strcpy() function must copy
the terminating NUL character in the destination buffer.
2) In the malloc library: the free() function must reset
the entry associated to the released buffer in the alloc[array].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_libs/malloc.h

    r777 r781  
    1212// Free blocks organisation:
    1313// - All free blocks have a size that is a power of 2, larger or equal
    14 //   to MIN_BLOCK_SIZE (typically 128 bytes).
     14//   to MIN_BLOCK_SIZE (typically 64 bytes).
    1515// - All free blocks are aligned.
    1616// - They are pre-classed in NB_SIZES linked lists, where all blocks in a
     
    4747//   of the allocated block must be obtained from the base address of the block. 
    4848// - The number of entries in this array is equal to the max number
    49 //   of allocated block is : heap_size / 128.
     49//   of allocated block is : heap_size / MIN_BLOCK_SIZE.
    5050// - For each allocated block, the value registered in the alloc[] array
    5151//   is log2( size_of_allocated_block ).
Note: See TracChangeset for help on using the changeset viewer.