BurstFS_Client/src/cruise-stack.c
void cruise_stack_init(void* start, int size)
{
  cruise_stack* stack = (cruise_stack*) start;
  stack->size = size;
  stack->last = size;

  int i;
  int* entries = (int*) ((char*)start + sizeof(cruise_stack));
  for (i = 0; i < size; i++) {
    /* flip the order so low numbers are at the top
     * to make debugging easier */
    entries[i] = size-1 - i;
  }
}
/* intializes stack to record all entries as being free */
intializes stack to record all entries as being free
intializes stack to record all entries as being free
void cruise_stack_init(void* start, int size)
{
  cruise_stack* stack = (cruise_stack*) start;
  stack->size = size;
  stack->last = size;
  int i;
  int* entries = (int*) ((char*)start + sizeof(cruise_stack));
  for (i = 0; i < size; i++) {
    entries[i] = size-1 - i;
  }
}
void cruise_stack_init ( void * start , int size ) { cruise_stack * stack = ( cruise_stack * ) start ; stack -> size = size ; stack -> last = size ; int i ; int * entries = ( int * ) ( ( char * ) start + sizeof ( cruise_stack ) ) ; for ( i = 0 ; i < size ; i ++ ) { entries [ i ] = size - 1 - i ; } }
intializes stack to record all entries as being free
intializes stack to record all entries as being free
/* flip the order so low numbers are at the top
     * to make debugging easier */