fix pointer type in dex_mem

This commit is contained in:
Kyle Maxwell 2009-02-24 14:53:05 -08:00
parent 72c6739dfd
commit 2287f08979
2 changed files with 10 additions and 4 deletions

View File

@ -1,14 +1,20 @@
#include "dex_mem.h"
#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
struct obstack * dex_obstack = NULL;
static struct obstack dex_obstack;
static bool dex_obstack_initialized = false;
void dex_collect() {
obstack_free(&dex_obstack, NULL);
dex_obstack = NULL;
obstack_init(&dex_obstack);
}
void * dex_alloc(int size) {
if(dex_obstack == NULL) obstack_init(&dex_obstack);
if(!dex_obstack_initialized) {
obstack_init(&dex_obstack);
dex_obstack_initialized = true;
}
return obstack_alloc(&dex_obstack, size);
}

View File

@ -2,7 +2,7 @@
# libtool - Provide generalized library-building support services.
# Generated automatically by config.status (dexterc) 1.0
# Libtool was configured on host 111.flood.pivotallabs.com:
# Libtool was configured on host kyle-maxwells-macbook.local:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,