|
@@ -95,7 +95,6 @@ static char heap[HEAP_SIZE] __attribute__ (( aligned ( __alignof__(void *) )));
|
95
|
95
|
*
|
96
|
96
|
* @c align must be a power of two. @c size may not be zero.
|
97
|
97
|
*/
|
98
|
|
-__attribute__ ((malloc))
|
99
|
98
|
void * alloc_memblock ( size_t size, size_t align ) {
|
100
|
99
|
struct memory_block *block;
|
101
|
100
|
size_t align_mask;
|
|
@@ -249,7 +248,6 @@ void free_memblock ( void *ptr, size_t size ) {
|
249
|
248
|
* Calling realloc() with a new size of zero is a valid way to free a
|
250
|
249
|
* memory block.
|
251
|
250
|
*/
|
252
|
|
-__attribute__ ((malloc))
|
253
|
251
|
void * realloc ( void *old_ptr, size_t new_size ) {
|
254
|
252
|
struct autosized_block *old_block;
|
255
|
253
|
struct autosized_block *new_block;
|
|
@@ -299,7 +297,6 @@ void * realloc ( void *old_ptr, size_t new_size ) {
|
299
|
297
|
* Allocates memory with no particular alignment requirement. @c ptr
|
300
|
298
|
* will be aligned to at least a multiple of sizeof(void*).
|
301
|
299
|
*/
|
302
|
|
-__attribute__ ((malloc))
|
303
|
300
|
void * malloc ( size_t size ) {
|
304
|
301
|
return realloc ( NULL, size );
|
305
|
302
|
}
|
|
@@ -329,7 +326,6 @@ void free ( void *ptr ) {
|
329
|
326
|
* This function name is non-standard, but pretty intuitive.
|
330
|
327
|
* zalloc(size) is always equivalent to calloc(1,size)
|
331
|
328
|
*/
|
332
|
|
-__attribute__ ((malloc))
|
333
|
329
|
void * zalloc ( size_t size ) {
|
334
|
330
|
void *data;
|
335
|
331
|
|