This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] allocator reorg


This patch adds the MT allocator graciously donated by Stefan Olsson and
Ola Rönnerup. It also re-organizes the allocator code to improve
legibility and to make it more modular.

I think this is the right way to go, and would like to check this in.
However, I'll wait for 24 hrs for comments. As people may be aware, the
3.4 branch creation deadline is looming, so CVS intensive work should be
done by the end of the week.

Things that may be done after this patch is in:

1) splitting __gnu_cxx into public/private or adding nested namespaces
for this. Please discuss this on a separate thread. 

2) removing some of the allocator_traits.h bits. 

3) trying to figure out a better way to switch default allocators, ie
extensions to _GLIBCPP_FORCE_NEW.

tested x86/linux

-benjamin

2003-06-10  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/stl_alloc.h (__debug_alloc): Move out.
	(__malloc_alloc): Same.
	(__pool_alloc): Same.
	(__new_alloc): Same.
	Rename to..
	* include/bits/allocator.h: ...this.
	* include/bits/stl_deque.h: Modify comment.
	* include/bits/stl_tree.h: Modify include.
	* include/std/std_memory.h: Same.
	* include/ext/rope: Same.
	* include/ext/slist: Same.	
	* include/std/std_vector.h: Same.
	* include/std/std_stack.h: Same.
	* include/std/std_queue.h: Same.
	* include/std/std_list.h: Same.
	* include/std/std_deque.h: Same.
	* include/backward/alloc.h: Same.
	* include/ext/debug_allocator.h: New.
	* include/ext/malloc_allocator.h: New.	
	* include/ext/pool_allocator.h: New.		
	* include/ext/new_allocator.h: New.
	* include/bits/pthread_allocimpl.h: Remove.
	* include/bits/stl_pthread_alloc.h: Remove.	
	* include/Makefile.am (ext_headers): Add.
	* include/Makefile.in: Regenerate.
	* src/stl-inst.cc: Use __gnu_cxx namespace.
	* src/stl-inst.cc: Move to...
	* src/allocator-inst.cc: Here.
	* src/Makefile.am (sources): Update.
	* src/Makefile.in: Regenerate.
	* testsuite/ext/headers.cc: Add.
	* testsuite/ext/allocators.cc: Fixup.
	
2003-06-10  Stefan Olsson  <stefan@snon.net>
            Ola Rönnerup  <fnolis@home.se>
	
	* include/Makefile.am (ext_headers): Add.
	* include/Makefile.in: Regenerate.
	* include/ext/mt_allocator.h: New file.

Attachment: p.20030610-1.bz2
Description: BZip2 compressed data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]