fix prototype of vm_mmap, and fix Sparc-relevant alignment for small tagged objects

svn: r3575
This commit is contained in:
Matthew Flatt 2006-07-02 12:38:07 +00:00
parent 8ef3812d17
commit 25f5e6b4eb
2 changed files with 4 additions and 0 deletions

View File

@ -419,8 +419,10 @@ static void *allocate_big(size_t sizeb, int type)
#ifdef ALIGN_DOUBLES
# define ALIGN_SIZE(sizew) ((sizew & 0x1) ? (sizew + 1) : sizew)
# define ALIGN_BYTES_SIZE(sizeb) ((sizeb & WORD_SIZE) ? (sizeb + WORD_SIZE) : sizeb)
#else
# define ALIGN_SIZE(sizew) (sizew)
# define ALIGN_BYTES_SIZE(sizeb) (sizeb)
#endif
inline static void *allocate(size_t sizeb, int type)
@ -485,6 +487,7 @@ void *GC_malloc_one_small_tagged(size_t sizeb)
unsigned long newsize;
sizeb += WORD_SIZE;
sizeb = ALIGN_BYTES_SIZE(sizeb);
newsize = gen0_alloc_page->size + sizeb;
if(newsize > GEN0_PAGE_SIZE) {

View File

@ -36,6 +36,7 @@ int fd, fd_created;
#endif
inline static void *find_cached_pages(size_t len, size_t alignment);
static void free_actual_pages(void *p, size_t len, int zeroed);
/* Instead of immediately freeing pages with munmap---only to mmap
them again---we cache BLOCKFREE_CACHE_SIZE freed pages. A page is