}
void *acc_malloc(size_t size, AccChannel *channel){
void *an_allocation_pt = malloc(size);
- if( channel ) da_push((Da *)(channel->outstanding_malloc), &an_allocation_pt);
+ if( channel ) da_push((Da *)(channel->outstanding_malloc), &an_allocation_pt);//tried taking out reference but fixed nothing
return (void *)an_allocation_pt;
}
void acc_free(void *pt, AccChannel *channel){
// allocate space for a new element at the end of the array
static char *da_push_alloc(Da *dap){
size_t element_off = dap->end - dap->base;
+ //printf("help help help I'm melting!");
dap->end += dap->element_size;
if( dap->end > dap->base + dap->size ) da_expand(dap);
return dap->base + element_off;
AccChannel acc0;
AccChannel *acc0_pt = acc_open(&acc0, acc_FULL);
- Da da0;
- Da *dap = (Da *)da_init(&da0, sizeof(int), NULL);
+ //Da da0;
+ //Da *dap = (Da *)da_init(&da0, sizeof(int), NULL); //trying to use acc0_pt results in even more immediate seg fault
-
printf("Outstanding Malloc: %d\n", (int)(acc0_pt->outstanding_malloc));
printf("Spurious Free: %d\n", (int)(acc0_pt->spurious_free));
acc_report(acc0_pt);