Re: [Stlport-devel] Tweaking vector allocation
Brought to you by:
complement
|
From: Petr O. <pt...@is...> - 2008-08-02 06:43:20
|
On Saturday 02 August 2008 09:09:00 Nigel Stewart wrote: > ... > But there are quite a few allocators involved in std::hash_map > with the internal vector and slist, including temporary ones. Why not to change allocator on malloc or new? Otherwise you depends upon internal implementation of ... well, std::hash_map. In any case, change implementation of std::hash_map just because you want to develop specific allocator ... bad suggestion IMO. > Having allocators that are costly to copy or swap don't seem > so promising. Nor any assumption that the same allocator > is responsible for allocating and deallocating a node. > > My main aim is to deal with list, set and map nodes by > allocating larger pieces of memory and subdividing those > to reduce malloc/free traffic and overhead. > > I guess this kind of optimisation is not new, but I don't > see too much online regarding custom allocators for > std::hash_map, std::list and std::map. > |