Пример #1
0
void genstackfree(int stop_id)
{
  memuse_list_t *curlist = stackusage;
  while (curlist && curlist->list_id > stop_id)
  {
    _stack_genusage(curlist, 0);
    curlist = curlist->prev;
  }
}
Пример #2
0
void popstacklist(int codegen)
{
  memuse_list_t *oldlist;
  assert(stackusage != NULL);

  if (codegen)
  {
    _stack_genusage(stackusage, 1);
    assert(stackusage->head==NULL);
  }

  oldlist = stackusage->prev;
  free(stackusage);
  stackusage = oldlist;
}
Пример #3
0
void popstacklist(int codegen)
{
  memuse_list_t *oldlist;
  assert(stackusage != NULL);

  if (codegen)
  {
    _stack_genusage(stackusage, 1);
    assert(stackusage->head==NULL);
  } else {
    memuse_t *use = stackusage->head;
    while (use) {
      memuse_t *temp = use->prev;
      free(use);
      use = temp;
    }
  }

  oldlist = stackusage->prev;
  free(stackusage);
  stackusage = oldlist;
}