Add :IMMOBILE-CODE feature.
[sbcl.git] / src / runtime / alloc.h
blobc5c5dc25e0a090e48a9fb40e0fef24eb97c8bf91
1 /*
2 * This software is part of the SBCL system. See the README file for
3 * more information.
5 * This software is derived from the CMU CL system, which was
6 * written at Carnegie Mellon University and released into the
7 * public domain. The software is in the public domain and is
8 * provided with absolutely no warranty. See the COPYING and CREDITS
9 * files for more information.
12 #ifndef _ALLOC_H_
13 #define _ALLOC_H_
15 #include "sbcl.h"
16 #include "runtime.h"
17 #include "gc-internal.h"
18 #include "genesis/sap.h"
20 #ifdef LISP_FEATURE_GENCGC
21 extern lispobj *general_alloc(sword_t bytes, int page_type_flag);
22 extern lispobj alloc_code_object(unsigned boxed, unsigned unboxed);
23 #endif
25 #define DX_ALLOC_SAP(var_name, ptr) \
26 lispobj var_name; \
27 struct sap _dx_##var_name __attribute__ ((aligned (N_WORD_BYTES * 2))); \
28 do { \
29 _dx_##var_name.header = (1 << 8) | SAP_WIDETAG; \
30 _dx_##var_name.pointer = (char *)(ptr); \
31 var_name = make_lispobj(&_dx_##var_name, OTHER_POINTER_LOWTAG); \
32 } while (0)
34 #endif /* _ALLOC_H_ */