开发者

Extension wrapper malloc allocator for C++ STL

Apparently there is a “malloc_allocator” provided with gcc f开发者_StackOverflowor use with STL. It simply wraps malloc and free. There is also a hook for an out-of-memory handler. Where can I find more about it? Where can I find its header file? I’m using gcc 4.x.


Is this something you want? You will need to include and pass in an object as the STL object's allocator template parameter.


The out-of-memory handler in c++ is defined via set_new_handler, which might be in the <new> header, but I'm not sure.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜