patch-2.3.99-pre9 linux/ipc/util.c
Next file: linux/kernel/exec_domain.c
Previous file: linux/ipc/shm.c
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Mon May 15 11:19:26 2000
- Orig file:
v2.3.99-pre8/linux/ipc/util.c
- Orig date:
Thu May 11 15:30:08 2000
diff -u --recursive --new-file v2.3.99-pre8/linux/ipc/util.c linux/ipc/util.c
@@ -159,25 +159,19 @@
void* ipc_alloc(int size)
{
void* out;
- if(size > PAGE_SIZE) {
- lock_kernel();
+ if(size > PAGE_SIZE)
out = vmalloc(size);
- unlock_kernel();
- } else {
+ else
out = kmalloc(size, GFP_KERNEL);
- }
return out;
}
void ipc_free(void* ptr, int size)
{
- if(size > PAGE_SIZE) {
- lock_kernel();
+ if(size > PAGE_SIZE)
vfree(ptr);
- unlock_kernel();
- } else {
+ else
kfree(ptr);
- }
}
/*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)