Lines Matching defs:heap
24 struct heap {
30 init_heap (struct heap* heap, word_t max){
31 heap->curr = (word_t) malloc(max);
32 //printf("%lu\n", heap->curr);
33 heap->max = heap->curr + max;
37 alloc(struct heap* heap, word_t bytes){
38 if(heap->curr + bytes > heap->max)
40 heap->curr += bytes;
41 return (void*) heap->curr - bytes;
47 struct heap* h = malloc(sizeof(struct heap));
66 /* allocate and write 128 ints to the heap */
81 /* check heap is full */