Skip to contentSkip to conversation

DISCUSSION [email protected] 2 participants 2 messages Jun 11, 2001

lore
Share & tools
lore
#0 lore raw

Hi,
Is there some kernel api to validate memory allocated using kmalloc. Suppose, I allocate some memory using kmalloc and at a later point of execution
I would like to validate if the memory allocated is not possibly freed by some other thread.

Pls suggest a patch/pointers if any.
I also noticed a commented 'CONFIG_DEBUG_MALLOC' config option (2.4.3 source),
It doesn't seem to be functional. Any pointers towards the history behind it would also be helpful.

Thanks in advance,
Kiran

#1 lore raw

you can use "sys_mprotect" call which is kernel space equ. of "mprotect" . The implementation for the same can be found in "mm\mprotect.c".

anil

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of [email protected]
Sent: Monday, June 11, 2001 10:29 AM
To: [email protected]
Subject:

Hi,
Is there some kernel api to validate memory allocated using kmalloc. Suppose, I allocate some memory using kmalloc and at a later point of execution
I would like to validate if the memory allocated is not possibly freed by some other thread.

Pls suggest a patch/pointers if any.
I also noticed a commented 'CONFIG_DEBUG_MALLOC' config option (2.4.3 source),
It doesn't seem to be functional. Any pointers towards the history behind it would also be helpful.

Thanks in advance,
Kiran

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/