On Wed, 10 Oct 2007, Kenneth Lerman wrote:
> I'm very comfortable using the standard C libraries, but have concerns about
> using the C++ class libraries. Specifically, I'm concerned that their use of
> memory might be somewhat less deterministic than the rest of emc. In a
> previous life involving other projects of this nature, I heard strong
> arguments both for and against using such libraries. I purposely avoided
> using the map class in my code.
>
> Ken

I'm not too familiar with C++ memory allocation, but I thought I'd share 
this nifty hack, courtesy of pete vavaroutsos:

#ifdef __cplusplus
// Overloaded new operator used to call constructors explicitly without
// memory allocation. This prevents dynamic reallocation of memory which can
// cause problems if we request memory that is not available - not a good
// situation to be in when you are rapidly moving chunks of iron around.
inline void *operator new (size_t s, void *ptr) { return(ptr); }
inline void     *operator new [] (size_t, void *ptr) { return(ptr); }



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to