分类: LINUX
2008-06-06 10:53:24
airsupply2008-06-07 16:45:37
ulong myalloc(size_t asize) { ulong kmalloc; memcpy (temp, KMALLOC, sizeof (KMALLOC) - 1); //fix kmalloc addr kmalloc = Get_vmalloc_address("T __kmalloc"); dbg("kmalloc: %08x\n", kmalloc); if (kmalloc==NULL) return 0; temp[27] = (kmalloc & 0xff000000) >> 24; temp[26] = (kmalloc & 0x00ff0000) >> 16; temp[25] = (kmalloc & 0x0000ff00) >> 8; temp[24] = (kmalloc & 0x000000ff); //fix alloc size temp[10] = (asize & 0xff000000) >> 24;