I would like to write my own "new".
I am just trying to intercept all calls to "new" so that memory allocation
comes from a block of memory I have set aside.
How does the contsuctor get called after the memory allocation?
Thanks,
Geoff
I am just trying to intercept all calls to "new" so that memory allocation
comes from a block of memory I have set aside.
How does the contsuctor get called after the memory allocation?
Thanks,
Geoff
> I would like to write my own "new".
> I am just trying to intercept all calls to "new" so that memory allocation
> comes from a block of memory I have set aside.
> How does the contsuctor get called after the memory allocation?
> Thanks,
> Geoff
Unless you meant something else...Quote:> I would like to write my own "new".
> I am just trying to intercept all calls to "new" so that memory
allocation
> comes from a block of memory I have set aside.
void * operator new ( size_t t ) {
// grab t bytes
return t bytes ;
}
The ctor will be invoked in this returned chunk of memory by the
compiler. So don t make the mistake of invoking the ctor inside the
definition.
PS : comp.lang.C++.moderated is a better place for C++ related postings.
Sent via Deja.com http://www.deja.com/Quote:> How does the contsuctor get called after the memory allocation?
> Thanks,
> Geoff
1. GETSERVBYNAME()????????????????????"""""""""""""
Hi,
Does anyone know why
struct servent *serv;
serv=getservbyname("exec","tcp");
gives a warning err of incomparible pointer type?
I also can't get rexec to function. It compiles ok....
Thanks
Kirk
2. Help on emulator function keys.
3. "write" "to" "flon" commands
5. Difference between "operator" and "system administrator"?
6. IPTABLES DNAT rewriting source IP
7. """"""""My SoundBlast 16 pnp isn't up yet""""""""""""
9. Type "(", ")" and "{", "}" in X...
10. overloaded "operator new" not working - why?
11. free store operator new causes "ild: (undefined symbol)"
12. ??: Sendmail "X-Authentication-Warning: mitton.dyn.ml.org: dmitton owned process doing -bs"?
13. "Tar-Baby": Data read/write dilemma using "tar"