mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2025-12-06 02:40:26 -08:00
Use type cl_index to perform page and pointer arithmetics.
This commit is contained in:
parent
03435a65bd
commit
fabc59520f
1 changed files with 2 additions and 2 deletions
|
|
@ -42,9 +42,9 @@ struct typemanager {
|
|||
#define INIT_HOLEPAGE 150
|
||||
#define CBMINSIZE 64 /* contiguous block minimal size */
|
||||
|
||||
#define page(p) (((intptr_t)(char *)(p) / LISP_PAGESIZE) - (DATA_START/LISP_PAGESIZE))
|
||||
#define page(p) (((cl_index)(char *)(p) / LISP_PAGESIZE) - (DATA_START/LISP_PAGESIZE))
|
||||
#define pagetochar(x) ((char *)(((x) * LISP_PAGESIZE) + DATA_START))
|
||||
#define round_to_page(x) (((intptr_t)(x) + LISP_PAGESIZE - 1) / LISP_PAGESIZE)
|
||||
#define round_to_page(x) (((cl_index)(x) + LISP_PAGESIZE - 1) / LISP_PAGESIZE)
|
||||
#define round_up(n) (((n) + 03) & ~03)
|
||||
#define available_pages() ((size_t)(real_maxpage-page(heap_end)-new_holepage-real_maxpage/32))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue