Changes between Version 6 and Version 7 of kernel_malloc
- Timestamp:
- Jan 15, 2015, 6:53:47 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
kernel_malloc
v6 v7 13 13 14 14 === void '''_heap_init'''( ) === 15 This function initialises the kernel_heap[x][y] descriptors array. 16 It must exist one heap vseg in each cluster. The vseg length must be a power of 2, and the vseg base address must be aligned. 15 This function initialises the kernel_heap[X_SIZE][Y_SIZE] descriptors array for all clusters containing a global vseg with the VOBJ_TYPE_HEAP. The vseg length must be a power of 2, and the vseg base address must be aligned.If there is no kernel heap in a cluster[x][y], the heap_size field of the descriptor is 0, and any kernel request to allocate memory creates a GIET error. 17 16 18 17 === void* '''_remote_malloc'''( unsigned int size, unsigned int x, unsigned int y ) === … … 21 20 * '''x''' : cluster X coordinate 22 21 * '''y''' : cluster Y coordinate 23 The block size required can be any value, but the allocated block can be larger: the actual size is the smallest power of 2 value larger or equal to the requested size. The base address is always aligned.24 If no block satisfying the request is available it returns a NULL pointer.22 The requested block size can be any value, but the allocated block can be larger than requested: the actual size is the smallest power of 2 value larger or equal to the requested size. The base address is always aligned. 23 If no block satisfying the request is available it creates a GIET error. 25 24