"Dmitriy V'jukov" <dvyukov@[EMAIL PROTECTED]
> wrote in message
news:a5656716-2077-4177-97d0-340809d3959d@[EMAIL PROTECTED]
Oct 2, 8:29 pm, "Chris M. Thomasson" <n...@[EMAIL PROTECTED]
> wrote:
> > But how could I efficiently intermingle large blocks and small blocks
> > from a
> > single reserved memory pool?
> In one of my programs I used following scheme:
[...]
Please correct me if I am wrong, but it seems as if this particular
allocator interface would "need" to know what type it was dealing with in
advance; correct? In other words, it probably could not be used to
overload
global operator new/delete right? Or, is `derived_t' dealing with internal
allocator structures. Where am I going wrong here Dmitriy? You know, I was
thinking about creating something special for C++. But, I am a C
programmer,
and felt the need to sup****t my language of choice. The cool thing about
C++
is that you can do exactly what you did. Also, you can overload class
local
delete operator and have it automatically return the size of the dynamic
allocation be it single object or array. If the user allocated an array,
you
simply divide this size of object size, and bam you have array size. I
think
C++ is neat, but I have to sup****t C++. I mean, the region allocator I did
in C++ did not even think about taking advantage of its "features". A C
guy
thinks well, need to overload global new/delete. We don't think about the
fact that C++ can provide the size of an allocation in the class-local
overloaded delete operator.
Humm... I need to learn C++! I have some problems reacting to error
conditions in dtors as per my following query over in `comp.lang.c++':
http://groups.google.com/group/comp.lang.c++/browse_frm/thread/ec97ab562016d016
lol; I think ASM and program C; am I totally lost?
;^D
BTW, I wonder why C++ could not return the size of dynamic allocation in
global overloaded delete operator? Humm... There must be a perfectly
straight forward reason indeed. Also, try to cut me some slack if I ask
totally retarded questions about C++... :^P


|