X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fos-common.c;h=3fdf92518ad4cb3c6721e003039da0b2b3d447b8;hb=2cb068e245e00505076e9c325424df2a1260bfb1;hp=80a34d2095eda6adb0ed7564afde55c5b4ff0a14;hpb=b27fb452f72190637b03a6ef2e1333091da42a98;p=sbcl.git diff --git a/src/runtime/os-common.c b/src/runtime/os-common.c index 80a34d2..3fdf925 100644 --- a/src/runtime/os-common.c +++ b/src/runtime/os-common.c @@ -62,51 +62,12 @@ os_allocate(os_vm_size_t len) return os_validate((os_vm_address_t)NULL, len); } -os_vm_address_t -os_allocate_at(os_vm_address_t addr, os_vm_size_t len) -{ - return os_validate(addr, len); -} - void os_deallocate(os_vm_address_t addr, os_vm_size_t len) { os_invalidate(addr,len); } -/* (This function once tried to grow the chunk by asking os_validate - * whether the space was available, but that really only works under - * Mach.) */ -os_vm_address_t -os_reallocate(os_vm_address_t addr, os_vm_size_t old_len, os_vm_size_t len) -{ - addr=os_trunc_to_page(addr); - len=os_round_up_size_to_page(len); - old_len=os_round_up_size_to_page(old_len); - - if (addr==NULL) - return os_allocate(len); - else{ - long len_diff=len-old_len; - - if (len_diff<0) - os_invalidate(addr+len,-len_diff); - else{ - if (len_diff!=0) { - os_vm_address_t new=os_allocate(len); - - if(new!=NULL){ - bcopy(addr,new,old_len); - os_invalidate(addr,old_len); - } - - addr=new; - } - } - return addr; - } -} - int os_get_errno(void) {