patch-2.1.125 linux/ipc/shm.c
Next file: linux/kernel/dma.c
Previous file: linux/init/main.c
Back to the patch index
Back to the overall index
- Lines: 26
- Date:
Tue Oct 6 14:08:44 1998
- Orig file:
v2.1.124/linux/ipc/shm.c
- Orig date:
Wed Aug 26 11:37:45 1998
diff -u --recursive --new-file v2.1.124/linux/ipc/shm.c linux/ipc/shm.c
@@ -18,6 +18,7 @@
#include <linux/smp.h>
#include <linux/smp_lock.h>
#include <linux/init.h>
+#include <linux/vmalloc.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
@@ -101,7 +102,7 @@
return -ENOMEM;
}
- shp->shm_pages = (ulong *) kmalloc (numpages*sizeof(ulong),GFP_KERNEL);
+ shp->shm_pages = (ulong *) vmalloc (numpages*sizeof(ulong));
if (!shp->shm_pages) {
shm_segs[id] = (struct shmid_ds *) IPC_UNUSED;
wake_up (&shm_lock);
@@ -204,7 +205,7 @@
shm_swp--;
}
}
- kfree(shp->shm_pages);
+ vfree(shp->shm_pages);
shm_tot -= numpages;
kfree(shp);
return;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov