[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: How to hook the memory allocation in Lua
- From: you.zhi@...
- Date: Tue, 28 Aug 2007 19:10:29 +0800
I am working with Lua on an embedded
system.
The memory in the system is managed
in a list, using customized operator new and operator delete, just like:
void * operator new(size_t n)
{
return Allocate(n);
}
void operator delete(void * p)
{
if (p == NULL)
{
return;
}
Deallocate(p);
}
How can i hook the memory allocation
in Lua? Should i just working on luaM_realloc_()?
Any help is great appreciated.
--------------------------------------------------------
ZTE Information Security Notice: The information contained in this mail is solely property of the sender's organization. This mail communication is confidential. Recipients named above are obligated to maintain secrecy and are not permitted to disclose the contents of this communication to others.
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the originator of the message. Any views expressed in this message are those of the individual sender.
This message has been scanned for viruses and Spam by ZTE Anti-Spam system.