#include <sys/types.h>
#include <sys/stat.h>
+#ifdef BOEHM_GC
+#include <gc.h>
+#endif
+
#include "lisp.h"
#include "charset.h"
#include "keyboard.h"
make_realized_face (attr)
Lisp_Object *attr;
{
- struct face *face = (struct face *) xmalloc (sizeof *face);
- bzero (face, sizeof *face);
+ struct face *face = (struct face *) XGC_CALLOC (1, sizeof *face);
face->ascii_face = face;
bcopy (attr, face->lface, sizeof face->lface);
return face;
}
#endif /* HAVE_WINDOW_SYSTEM */
- xfree (face);
+ XGC_FREE (face);
}
}
struct face_cache *c;
int size;
- c = (struct face_cache *) xmalloc (sizeof *c);
- bzero (c, sizeof *c);
+ c = (struct face_cache *) XGC_CALLOC (1, sizeof *c);
size = FACE_CACHE_BUCKETS_SIZE * sizeof *c->buckets;
- c->buckets = (struct face **) xmalloc (size);
+ c->buckets = (struct face **) XGC_MALLOC_ATOMIC (size);
bzero (c->buckets, size);
c->size = 50;
- c->faces_by_id = (struct face **) xmalloc (c->size * sizeof *c->faces_by_id);
+ c->faces_by_id = (struct face **) XGC_MALLOC (c->size * sizeof *c->faces_by_id);
c->f = f;
c->menu_face_changed_p = menu_face_changed_default;
return c;
if (c)
{
free_realized_faces (c);
- xfree (c->buckets);
- xfree (c->faces_by_id);
- xfree (c);
+ XGC_FREE (c->buckets);
+ XGC_FREE (c->faces_by_id);
+ XGC_FREE (c);
}
}
{
int new_size = 2 * c->size;
int sz = new_size * sizeof *c->faces_by_id;
- c->faces_by_id = (struct face **) xrealloc (c->faces_by_id, sz);
+ c->faces_by_id = (struct face **) XGC_REALLOC (c->faces_by_id, sz);
c->size = new_size;
}