stl_map Implementation Details for Development of Custom Allocator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have noticed in my development of a customized allocator for maps
that the library calls the templated copy constructor in the allocator
class each and every time the map is accessed (ex - through
operator[])

I understand that the templated copy constructor needs to be called to
get an allocator which can handle memory requests for Rb_Tree_Nodes.
What puzzles me is why this conversion couldn't be done once and the
resulting node allocator be used thereon after without converting the
allocator each and every time - which could be a hit on performance.


Thanks in advance

Cheers
Kosala.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux