зеркало из https://github.com/github/ruby.git
* gc.c (CEILDIV): rename to a appropriate name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
c104867ebc
Коммит
0da31416f1
|
@ -1,3 +1,7 @@
|
|||
Tue Feb 14 20:22:11 2012 Narihiro Nakamura <authornari@gmail.com>
|
||||
|
||||
* gc.c (CEILDIV): rename to a appropriate name.
|
||||
|
||||
Tue Feb 14 18:07:20 2012 Narihiro Nakamura <authornari@gmail.com>
|
||||
|
||||
* gc.c (assign_heap_slot): SEGV happens cause on 64-bit platform
|
||||
|
|
4
gc.c
4
gc.c
|
@ -544,10 +544,10 @@ rb_objspace_free(rb_objspace_t *objspace)
|
|||
#define HEAP_ALIGN_MASK (~(~0UL << HEAP_ALIGN_LOG))
|
||||
#define REQUIRED_SIZE_BY_MALLOC (sizeof(size_t) * 5)
|
||||
#define HEAP_SIZE (HEAP_ALIGN - REQUIRED_SIZE_BY_MALLOC)
|
||||
#define CEILMOD(i, mod) (((i) + (mod) - 1)/(mod))
|
||||
#define CEILDIV(i, mod) (((i) + (mod) - 1)/(mod))
|
||||
|
||||
#define HEAP_OBJ_LIMIT (unsigned int)((HEAP_SIZE - sizeof(struct heaps_header))/sizeof(struct RVALUE))
|
||||
#define HEAP_BITMAP_LIMIT CEILMOD(HEAP_OBJ_LIMIT, sizeof(uintptr_t)*8)
|
||||
#define HEAP_BITMAP_LIMIT CEILDIV(HEAP_OBJ_LIMIT, sizeof(uintptr_t)*8)
|
||||
|
||||
#define GET_HEAP_HEADER(x) (HEAP_HEADER(((uintptr_t)x) & ~(HEAP_ALIGN_MASK)))
|
||||
#define GET_HEAP_SLOT(x) (GET_HEAP_HEADER(x)->base)
|
||||
|
|
Загрузка…
Ссылка в новой задаче