summaryrefslogtreecommitdiff
path: root/examples/Shared_Malloc
diff options
context:
space:
mode:
Diffstat (limited to 'examples/Shared_Malloc')
-rw-r--r--examples/Shared_Malloc/Makefile574
-rw-r--r--examples/Shared_Malloc/Malloc.cpp123
-rw-r--r--examples/Shared_Malloc/Malloc.h29
-rw-r--r--examples/Shared_Malloc/Options.cpp193
-rw-r--r--examples/Shared_Malloc/Options.h85
-rw-r--r--examples/Shared_Malloc/Shared_Malloc.dsw64
-rw-r--r--examples/Shared_Malloc/malloc.dsp120
-rw-r--r--examples/Shared_Malloc/multiple_mallocs.dsp104
-rw-r--r--examples/Shared_Malloc/persistence.dsp104
-rw-r--r--examples/Shared_Malloc/position_independent_malloc.dsp120
-rw-r--r--examples/Shared_Malloc/test_malloc.cpp223
-rw-r--r--examples/Shared_Malloc/test_multiple_mallocs.cpp134
-rw-r--r--examples/Shared_Malloc/test_persistence.cpp347
-rw-r--r--examples/Shared_Malloc/test_position_independent_malloc.cpp209
-rw-r--r--examples/Shared_Malloc/test_position_independent_malloc.h26
15 files changed, 0 insertions, 2455 deletions
diff --git a/examples/Shared_Malloc/Makefile b/examples/Shared_Malloc/Makefile
deleted file mode 100644
index 8cd1212e00e..00000000000
--- a/examples/Shared_Malloc/Makefile
+++ /dev/null
@@ -1,574 +0,0 @@
-#----------------------------------------------------------------------------
-# $Id$
-#
-# Makefile for tests of the Shared_Malloc wrappers
-#----------------------------------------------------------------------------
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-
-BIN = test_malloc \
- test_persistence \
- test_position_independent_malloc \
- test_multiple_mallocs
-
-FILES = Malloc \
- Options
-
-SRC = $(addsuffix .cpp,$(FILES))
-OBJ = $(addsuffix .o,$(FILES))
-LSRC = $(SRC) $(addsuffix .cpp,$(BIN))
-
-BUILD = $(VBIN)
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-#----------------------------------------------------------------------------
-# Local targets
-#----------------------------------------------------------------------------
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-
-.obj/Malloc.o .obj/Malloc.so .shobj/Malloc.o .shobj/Malloc.so: Malloc.cpp Options.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/OS_Dirent.h \
- $(ACE_ROOT)/ace/OS_Export.h \
- $(ACE_ROOT)/ace/OS_Dirent.inl \
- $(ACE_ROOT)/ace/OS_String.h \
- $(ACE_ROOT)/ace/OS_String.inl \
- $(ACE_ROOT)/ace/OS_Memory.h \
- $(ACE_ROOT)/ace/OS_Memory.inl \
- $(ACE_ROOT)/ace/OS_TLI.h \
- $(ACE_ROOT)/ace/OS_TLI.inl \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i Malloc.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i
-
-.obj/Options.o .obj/Options.so .shobj/Options.o .shobj/Options.so: Options.cpp \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/OS_Dirent.h \
- $(ACE_ROOT)/ace/OS_Export.h \
- $(ACE_ROOT)/ace/OS_Dirent.inl \
- $(ACE_ROOT)/ace/OS_String.h \
- $(ACE_ROOT)/ace/OS_String.inl \
- $(ACE_ROOT)/ace/OS_Memory.h \
- $(ACE_ROOT)/ace/OS_Memory.inl \
- $(ACE_ROOT)/ace/OS_TLI.h \
- $(ACE_ROOT)/ace/OS_TLI.inl \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Get_Opt.i Options.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i
-
-.obj/test_malloc.o .obj/test_malloc.so .shobj/test_malloc.o .shobj/test_malloc.so: test_malloc.cpp \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/OS_Dirent.h \
- $(ACE_ROOT)/ace/OS_Export.h \
- $(ACE_ROOT)/ace/OS_Dirent.inl \
- $(ACE_ROOT)/ace/OS_String.h \
- $(ACE_ROOT)/ace/OS_String.inl \
- $(ACE_ROOT)/ace/OS_Memory.h \
- $(ACE_ROOT)/ace/OS_Memory.inl \
- $(ACE_ROOT)/ace/OS_TLI.h \
- $(ACE_ROOT)/ace/OS_TLI.inl \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Thread_Manager.i Malloc.h \
- Options.h
-
-.obj/test_persistence.o .obj/test_persistence.so .shobj/test_persistence.o .shobj/test_persistence.so: test_persistence.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/OS_Dirent.h \
- $(ACE_ROOT)/ace/OS_Export.h \
- $(ACE_ROOT)/ace/OS_Dirent.inl \
- $(ACE_ROOT)/ace/OS_String.h \
- $(ACE_ROOT)/ace/OS_String.inl \
- $(ACE_ROOT)/ace/OS_Memory.h \
- $(ACE_ROOT)/ace/OS_Memory.inl \
- $(ACE_ROOT)/ace/OS_TLI.h \
- $(ACE_ROOT)/ace/OS_TLI.inl \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i
-
-.obj/test_position_independent_malloc.o .obj/test_position_independent_malloc.so .shobj/test_position_independent_malloc.o .shobj/test_position_independent_malloc.so: \
- test_position_independent_malloc.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/OS_Dirent.h \
- $(ACE_ROOT)/ace/OS_Export.h \
- $(ACE_ROOT)/ace/OS_Dirent.inl \
- $(ACE_ROOT)/ace/OS_String.h \
- $(ACE_ROOT)/ace/OS_String.inl \
- $(ACE_ROOT)/ace/OS_Memory.h \
- $(ACE_ROOT)/ace/OS_Memory.inl \
- $(ACE_ROOT)/ace/OS_TLI.h \
- $(ACE_ROOT)/ace/OS_TLI.inl \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/Auto_Ptr.h \
- $(ACE_ROOT)/ace/Auto_Ptr.i \
- $(ACE_ROOT)/ace/Auto_Ptr.cpp \
- test_position_independent_malloc.h
-
-.obj/test_multiple_mallocs.o .obj/test_multiple_mallocs.so .shobj/test_multiple_mallocs.o .shobj/test_multiple_mallocs.so: test_multiple_mallocs.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/OS_Dirent.h \
- $(ACE_ROOT)/ace/OS_Export.h \
- $(ACE_ROOT)/ace/OS_Dirent.inl \
- $(ACE_ROOT)/ace/OS_String.h \
- $(ACE_ROOT)/ace/OS_String.inl \
- $(ACE_ROOT)/ace/OS_Memory.h \
- $(ACE_ROOT)/ace/OS_Memory.inl \
- $(ACE_ROOT)/ace/OS_TLI.h \
- $(ACE_ROOT)/ace/OS_TLI.inl \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Auto_Ptr.h \
- $(ACE_ROOT)/ace/Auto_Ptr.i \
- $(ACE_ROOT)/ace/Auto_Ptr.cpp
-
-.obj/Malloc.o .obj/Malloc.so .shobj/Malloc.o .shobj/Malloc.so: Malloc.cpp Options.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/OS_Dirent.h \
- $(ACE_ROOT)/ace/OS_Export.h \
- $(ACE_ROOT)/ace/OS_Dirent.inl \
- $(ACE_ROOT)/ace/OS_String.h \
- $(ACE_ROOT)/ace/OS_String.inl \
- $(ACE_ROOT)/ace/OS_Memory.h \
- $(ACE_ROOT)/ace/OS_Memory.inl \
- $(ACE_ROOT)/ace/OS_TLI.h \
- $(ACE_ROOT)/ace/OS_TLI.inl \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i Malloc.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i
-
-.obj/Options.o .obj/Options.so .shobj/Options.o .shobj/Options.so: Options.cpp \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/OS_Dirent.h \
- $(ACE_ROOT)/ace/OS_Export.h \
- $(ACE_ROOT)/ace/OS_Dirent.inl \
- $(ACE_ROOT)/ace/OS_String.h \
- $(ACE_ROOT)/ace/OS_String.inl \
- $(ACE_ROOT)/ace/OS_Memory.h \
- $(ACE_ROOT)/ace/OS_Memory.inl \
- $(ACE_ROOT)/ace/OS_TLI.h \
- $(ACE_ROOT)/ace/OS_TLI.inl \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Get_Opt.i Options.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/examples/Shared_Malloc/Malloc.cpp b/examples/Shared_Malloc/Malloc.cpp
deleted file mode 100644
index 0da94c9c0a6..00000000000
--- a/examples/Shared_Malloc/Malloc.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-// $Id$
-
-#include "Options.h"
-#include "Malloc.h"
-
-ACE_RCSID(Shared_Malloc, Malloc, "$Id$")
-
-// Strategic typedefs for memory allocation.
-
-typedef ACE_Malloc <ACE_LOCAL_MEMORY_POOL, ACE_SYNCH_MUTEX> L_ALLOCATOR;
-typedef ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex> M_ALLOCATOR;
-
-#if defined (ACE_LACKS_SYSV_SHMEM)
-typedef ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX> SP_ALLOCATOR;
-typedef ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX> ST_ALLOCATOR;
-#else
-typedef ACE_Malloc <ACE_SHARED_MEMORY_POOL, ACE_Process_Mutex> SP_ALLOCATOR;
-typedef ACE_Malloc <ACE_SHARED_MEMORY_POOL, ACE_SYNCH_MUTEX> ST_ALLOCATOR;
-#endif /* ACE_LACKS_SYSV_SHMEM */
-
-#if defined (ACE_LACKS_SBRK)
-typedef ACE_Malloc <ACE_LOCAL_MEMORY_POOL, ACE_SYNCH_MUTEX> SB_ALLOCATOR;
-#else
-typedef ACE_Malloc <ACE_SBRK_MEMORY_POOL, ACE_SYNCH_MUTEX> SB_ALLOCATOR;
-#endif /* ACE_LACKS_SBRK */
-
-// Singleton
-ACE_Allocator *Malloc::instance_ = 0;
-
-// This is a factory that decides what type of allocator to create.
-
-ACE_Allocator *
-Malloc::instance (void)
-{
- if (Malloc::instance_ == 0)
- {
- if (Options::instance ()->child ())
- Malloc::instance_ = new ACE_Allocator_Adapter<M_ALLOCATOR>;
- else if (Options::instance ()->spawn_threads ())
- {
- if (Options::instance ()->use_sbrk ())
- Malloc::instance_ = new ACE_Allocator_Adapter<SB_ALLOCATOR>;
- else if (Options::instance ()->use_shmem ())
- Malloc::instance_ = new ACE_Allocator_Adapter<ST_ALLOCATOR>;
- else
- Malloc::instance_ = new ACE_Allocator_Adapter<L_ALLOCATOR>;
- }
- else if (Options::instance ()->use_mmap ())
- Malloc::instance_ = new ACE_Allocator_Adapter<M_ALLOCATOR>;
- else // Use Shared_Memory_Pool.
- Malloc::instance_ = new ACE_Allocator_Adapter<SP_ALLOCATOR>;
- }
-
- return Malloc::instance_;
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Allocator_Adapter<L_ALLOCATOR>;
-template class ACE_Allocator_Adapter<M_ALLOCATOR>;
-#if !defined (ACE_LACKS_SBRK)
-template class ACE_Allocator_Adapter<SB_ALLOCATOR>;
-template class ACE_Malloc <ACE_SBRK_MEMORY_POOL, ACE_SYNCH_MUTEX>;
-template class ACE_Malloc_T <ACE_SBRK_MEMORY_POOL, ACE_SYNCH_MUTEX, ACE_Control_Block>;
-#endif /* ! ACE_LACKS_SBRK */
-#if !defined (ACE_LACKS_SYSV_SHMEM)
-template class ACE_Allocator_Adapter<SP_ALLOCATOR>;
-#endif /* ! ACE_LACKS_SYSV_SHMEM */
-template class ACE_Allocator_Adapter<ST_ALLOCATOR>;
-template class ACE_Malloc <ACE_LOCAL_MEMORY_POOL, ACE_SYNCH_MUTEX>;
-template class ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex>;
-template class ACE_Malloc_T <ACE_LOCAL_MEMORY_POOL, ACE_SYNCH_MUTEX, ACE_Control_Block>;
-template class ACE_Malloc_T <ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_Control_Block>;
-template class ACE_Read_Guard<ACE_Process_Mutex>;
-template class ACE_Write_Guard<ACE_Process_Mutex>;
-#if !defined (ACE_HAS_THREADS)
-template class ACE_Read_Guard<ACE_SYNCH_MUTEX>;
-template class ACE_Write_Guard<ACE_SYNCH_MUTEX>;
-#endif /* ! ACE_HAS_THREADS */
-
-#if defined (ACE_LACKS_SYSV_SHMEM)
-template class ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX>;
-template class ACE_Malloc_T <ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX, ACE_Control_Block>;
-#else
-template class ACE_Malloc <ACE_SHARED_MEMORY_POOL, ACE_Process_Mutex>;
-template class ACE_Malloc <ACE_SHARED_MEMORY_POOL, ACE_SYNCH_MUTEX>;
-template class ACE_Malloc_T <ACE_SHARED_MEMORY_POOL, ACE_Process_Mutex, ACE_Control_Block>;
-template class ACE_Malloc_T <ACE_SHARED_MEMORY_POOL, ACE_SYNCH_MUTEX, ACE_Control_Block>;
-#endif /* ACE_LACKS_SYSV_SHMEM */
-
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Allocator_Adapter<L_ALLOCATOR>
-#pragma instantiate ACE_Allocator_Adapter<M_ALLOCATOR>
-#if !defined (ACE_LACKS_SBRK)
-#pragma instantiate ACE_Allocator_Adapter<SB_ALLOCATOR>
-#pragma instantiate ACE_Malloc <ACE_SBRK_MEMORY_POOL, ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Malloc_T <ACE_SBRK_MEMORY_POOL, ACE_SYNCH_MUTEX, ACE_Control_Block>
-#endif /* ! ACE_LACKS_SYSV_SHMEM */
-#if !defined (ACE_LACKS_SBRK)
-#pragma instantiate ACE_Allocator_Adapter<SP_ALLOCATOR>
-#endif /* ! ACE_LACKS_SYSV_SHMEM */
-#pragma instantiate ACE_Allocator_Adapter<ST_ALLOCATOR>
-#pragma instantiate ACE_Malloc <ACE_LOCAL_MEMORY_POOL, ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex>
-#pragma instantiate ACE_Malloc_T <ACE_LOCAL_MEMORY_POOL, ACE_SYNCH_MUTEX, ACE_Control_Block>
-#pragma instantiate ACE_Malloc_T <ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_Control_Block>
-#pragma instantiate ACE_Read_Guard<ACE_Process_Mutex>
-#pragma instantiate ACE_Write_Guard<ACE_Process_Mutex>
-#if !defined (ACE_HAS_THREADS)
-#pragma instantiate ACE_Read_Guard<ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Write_Guard<ACE_SYNCH_MUTEX>
-#endif /* ! ACE_HAS_THREADS */
-
-#if defined (ACE_LACKS_SYSV_SHMEM)
-#pragma instantiate ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Malloc_T <ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX, ACE_Control_Block>
-#else
-#pragma instantiate ACE_Malloc <ACE_SHARED_MEMORY_POOL, ACE_Process_Mutex>
-#pragma instantiate ACE_Malloc <ACE_SHARED_MEMORY_POOL, ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Malloc_T <ACE_SHARED_MEMORY_POOL, ACE_Process_Mutex, ACE_Control_Block>
-#pragma instantiate ACE_Malloc_T <ACE_SHARED_MEMORY_POOL, ACE_SYNCH_MUTEX, ACE_Control_Block>
-#endif /* ACE_LACKS_SYSV_SHMEM */
-
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/examples/Shared_Malloc/Malloc.h b/examples/Shared_Malloc/Malloc.h
deleted file mode 100644
index 6d4cb6bfc12..00000000000
--- a/examples/Shared_Malloc/Malloc.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#ifndef MY_MALLOC_H
-#define MY_MALLOC_H
-
-#include "ace/Malloc.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class Malloc
- // = TITLE
- // Allocator Singleton.
-{
-public:
- static ACE_Allocator *instance (void);
- // Returns static instance.
-
-private:
- Malloc (void);
- // Ensure Singleton.
-
- static ACE_Allocator *instance_;
- // Malloc Singleton.
-};
-
-#endif /* MY_MALLOC_H */
diff --git a/examples/Shared_Malloc/Options.cpp b/examples/Shared_Malloc/Options.cpp
deleted file mode 100644
index 1870d07d1ae..00000000000
--- a/examples/Shared_Malloc/Options.cpp
+++ /dev/null
@@ -1,193 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "Options.h"
-#include "ace/Log_Msg.h"
-
-ACE_RCSID(Shared_Malloc, Options, "$Id$")
-
-// Static Singleton instance.
-Options *Options::instance_ = 0;
-
-Options *
-Options::instance (void)
-{
- if (Options::instance_ == 0)
- Options::instance_ = new Options ();
-
- return Options::instance_;
-}
-
-char *
-Options::program_name (void)
-{
- return this->program_name_;
-}
-
-const char *
-Options::slave_name (void)
-{
- return this->slave_name_;
-}
-
-int
-Options::debug (void)
-{
- return this->debug_;
-}
-
-int
-Options::exec_slave (void)
-{
- return this->exec_slave_;
-}
-
-size_t
-Options::iteration_count (void)
-{
- return this->iteration_count_;
-}
-
-int
-Options::use_sbrk (void)
-{
- return this->use_sbrk_;
-}
-
-size_t
-Options::max_msg_size (void)
-{
- return this->max_msg_size_;
-}
-
-size_t
-Options::spawn_count (void)
-{
- return this->spawn_count_;
-}
-
-int
-Options::spawn_threads (void)
-{
- return this->spawn_threads_;
-}
-
-int
-Options::use_mmap (void)
-{
- return this->use_mmap_;
-}
-
-int
-Options::use_shmem (void)
-{
- return this->use_shmem_;
-}
-
-int
-Options::child (void)
-{
- return this->child_;
-}
-
-// Explain usage and exit.
-
-void
-Options::print_usage_and_die (void)
-{
- ACE_ERROR ((LM_ERROR, "usage: %n"
- "\n[-d] (run in debugging mode)\n"
- "[-e] (use exec(2) in addition to fork(2))\n"
- "[-l] (use C++ new operator rather than sbrk(2)\n"
- "[-L max_msg_size]\n"
- "[-m] (use mmap rather than SysV shared memory)\n"
- "[-p] (use processes rather than threads)\n"
- "[-s] (use SysV shared memory rather than mmap)\n"
- "[-t number of threads or processes to spawn]\n"
- "[-T] (enable tracking)\n"
- "[-n iteration_count]\n%a", -1));
- /* NOTREACHED */
-}
-
-Options::Options (void)
- : slave_name_ ("slave"),
- debug_ (0),
- exec_slave_ (0),
- iteration_count_ (100),
- use_sbrk_ (0),
- use_shmem_ (0),
- max_msg_size_ (127),
- spawn_count_ (1),
- spawn_threads_ (1),
- use_mmap_ (0),
- child_ (0)
-{
-}
-
-void
-Options::parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opt (argc, argv, "dehlL:mn:pst:T");
-
- this->program_name_ = argv[0];
- ACE_LOG_MSG->open (this->program_name_);
-
- // Put in a special-case check for child process.
- if (ACE_OS::strcmp (this->program_name_, slave_name_) == 0)
- {
- this->child_ = 1;
- this->use_mmap_ = 1;
- }
-
- for (int c;
- (c = get_opt ()) != -1;
- )
- {
- switch (c)
- {
- case 'd':
- this->debug_ = 1;
- break;
- case 'e':
- this->exec_slave_ = 1;
- break;
- case 'h':
- this->print_usage_and_die ();
- /* NOTREACHED */
- break;
- case 'l':
- this->use_sbrk_ = 0;
- break;
- case 'L':
- this->max_msg_size_ = ACE_OS::atoi (get_opt.optarg);
- break;
- case 'm':
- this->use_mmap_ = 1;
- break;
- case 'n':
- this->iteration_count_ = ACE_OS::atoi (get_opt.optarg);
- break;
- case 'p': // Spawn processes rather than threads
- this->spawn_threads_ = 0;
- break;
- case 's':
- // Use System V shared memory...
- this->use_shmem_ = 1;
- break;
- case 't':
- this->spawn_count_ = ACE_OS::atoi (get_opt.optarg);
- break;
- case 'T':
- ACE_Trace::start_tracing ();
- break;
- default:
- this->print_usage_and_die ();
- /* NOTREACHED */
- break;
- }
- }
-
- // Switch to using MMAP when the -p and -e options are enabled.
- if (this->exec_slave_ == 1 && this->spawn_threads_ == 0)
- this->use_mmap_ = 1;
-}
diff --git a/examples/Shared_Malloc/Options.h b/examples/Shared_Malloc/Options.h
deleted file mode 100644
index c96cd5fb322..00000000000
--- a/examples/Shared_Malloc/Options.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#ifndef _OPTIONS
-#define _OPTIONS
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class Options
- // = TITLE
- // Options Singleton.
-{
-public:
- static Options *instance (void);
- // Return Singleton.
-
- void parse_args (int argc, char *argv[]);
- // Parse the arguments.
-
- // = Accessor methods.
- char *program_name (void);
- const char *slave_name (void);
- int debug (void);
- int exec_slave (void);
- size_t iteration_count (void);
- int use_sbrk (void);
- int use_shmem (void);
- size_t max_msg_size (void);
- size_t spawn_count (void);
- int spawn_threads (void);
- int use_mmap (void);
- int child (void);
-
-private:
- Options (void);
- // Ensure Singleton.
-
- static Options *instance_;
- // Singleton.
-
- void print_usage_and_die (void);
- // Explain usage and exit.
-
- char *program_name_;
- // Name of the program.
-
- const char *slave_name_;
- // Name of slave process.
-
- int debug_;
- // Flag to indicate if we are debugging.
-
- int exec_slave_;
- // Flag to indicate if we should exec after forking.
-
- size_t iteration_count_;
- // Number of iterations to call malloc_recurse().
-
- int use_sbrk_;
- // Should we use sbrk(2)?
-
- int use_shmem_;
- // Should we use Shared Memory?
-
- size_t max_msg_size_;
- // Maximum number of bytes to malloc.
-
- size_t spawn_count_;
- // Number of threads.
-
- int spawn_threads_;
- // Spawn threads vs. processes.
-
- int use_mmap_;
- // Use mmap() as the backing store.
-
- int child_;
- // We're a child process.
-};
-
-#endif /* _OPTIONS */
diff --git a/examples/Shared_Malloc/Shared_Malloc.dsw b/examples/Shared_Malloc/Shared_Malloc.dsw
deleted file mode 100644
index 5d0eb410dab..00000000000
--- a/examples/Shared_Malloc/Shared_Malloc.dsw
+++ /dev/null
@@ -1,64 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "malloc"=.\malloc.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "multiple_mallocs"=.\multiple_mallocs.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "persistence"=.\persistence.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "position_independent_malloc"=.\position_independent_malloc.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
diff --git a/examples/Shared_Malloc/malloc.dsp b/examples/Shared_Malloc/malloc.dsp
deleted file mode 100644
index bd5e63f3e83..00000000000
--- a/examples/Shared_Malloc/malloc.dsp
+++ /dev/null
@@ -1,120 +0,0 @@
-# Microsoft Developer Studio Project File - Name="malloc" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=malloc - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "malloc.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "malloc.mak" CFG="malloc - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "malloc - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "malloc - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "malloc - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\malloc\Release"
-# PROP BASE Intermediate_Dir ".\malloc\Release"
-# PROP BASE Target_Dir ".\malloc"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ".\malloc"
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\ace"
-
-!ELSEIF "$(CFG)" == "malloc - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\malloc\Debug"
-# PROP BASE Intermediate_Dir ".\malloc\Debug"
-# PROP BASE Target_Dir ".\malloc"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ".\malloc"
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "malloc - Win32 Release"
-# Name "malloc - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\Malloc.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Options.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_malloc.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\Malloc.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Options.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/Shared_Malloc/multiple_mallocs.dsp b/examples/Shared_Malloc/multiple_mallocs.dsp
deleted file mode 100644
index 0696dd6e144..00000000000
--- a/examples/Shared_Malloc/multiple_mallocs.dsp
+++ /dev/null
@@ -1,104 +0,0 @@
-# Microsoft Developer Studio Project File - Name="multiple_mallocs" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=multiple_mallocs - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "multiple_mallocs.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "multiple_mallocs.mak" CFG="multiple_mallocs - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "multiple_mallocs - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "multiple_mallocs - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "multiple_mallocs - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\multiple_mallocs\Release"
-# PROP BASE Intermediate_Dir ".\multiple_mallocs\Release"
-# PROP BASE Target_Dir ".\multiple_mallocs"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ".\multiple_mallocs"
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\ace"
-
-!ELSEIF "$(CFG)" == "multiple_mallocs - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\multiple_mallocs\Debug"
-# PROP BASE Intermediate_Dir ".\multiple_mallocs\Debug"
-# PROP BASE Target_Dir ".\multiple_mallocs"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ".\multiple_mallocs"
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "multiple_mallocs - Win32 Release"
-# Name "multiple_mallocs - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\test_multiple_mallocs.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/Shared_Malloc/persistence.dsp b/examples/Shared_Malloc/persistence.dsp
deleted file mode 100644
index e028d3c5b93..00000000000
--- a/examples/Shared_Malloc/persistence.dsp
+++ /dev/null
@@ -1,104 +0,0 @@
-# Microsoft Developer Studio Project File - Name="persistence" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=persistence - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "persistence.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "persistence.mak" CFG="persistence - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "persistence - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "persistence - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "persistence - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\persistence\Release"
-# PROP BASE Intermediate_Dir ".\persistence\Release"
-# PROP BASE Target_Dir ".\persistence"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ".\persistence"
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\ace"
-
-!ELSEIF "$(CFG)" == "persistence - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\persistence\Debug"
-# PROP BASE Intermediate_Dir ".\persistence\Debug"
-# PROP BASE Target_Dir ".\persistence"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ".\persistence"
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "persistence - Win32 Release"
-# Name "persistence - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\test_persistence.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/Shared_Malloc/position_independent_malloc.dsp b/examples/Shared_Malloc/position_independent_malloc.dsp
deleted file mode 100644
index 468e1720f25..00000000000
--- a/examples/Shared_Malloc/position_independent_malloc.dsp
+++ /dev/null
@@ -1,120 +0,0 @@
-# Microsoft Developer Studio Project File - Name="position_independent_malloc" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=position_independent_malloc - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "position_independent_malloc.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "position_independent_malloc.mak" CFG="position_independent_malloc - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "position_independent_malloc - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "position_independent_malloc - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "position_independent_malloc - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\position_independent_malloc\Release"
-# PROP BASE Intermediate_Dir ".\position_independent_malloc\Release"
-# PROP BASE Target_Dir ".\position_independent_malloc"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ".\position_independent_malloc"
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\ace"
-
-!ELSEIF "$(CFG)" == "position_independent_malloc - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\position_independent_malloc\Debug"
-# PROP BASE Intermediate_Dir ".\position_independent_malloc\Debug"
-# PROP BASE Target_Dir ".\position_independent_malloc"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ".\position_independent_malloc"
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "position_independent_malloc - Win32 Release"
-# Name "position_independent_malloc - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\Malloc.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Options.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_position_independent_malloc.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\Malloc.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Options.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/Shared_Malloc/test_malloc.cpp b/examples/Shared_Malloc/test_malloc.cpp
deleted file mode 100644
index cf1dfaa71d7..00000000000
--- a/examples/Shared_Malloc/test_malloc.cpp
+++ /dev/null
@@ -1,223 +0,0 @@
-// $Id$
-
-// This program tests out all the various ACE_Malloc combinations and
-// the ACE_Allocator_Adapter.
-
-#include "ace/Thread.h"
-#include "ace/Thread_Manager.h"
-#include "Malloc.h"
-#include "Options.h"
-
-ACE_RCSID(Shared_Malloc, test_malloc, "$Id$")
-
-static int
-gen_size (void)
-{
-#if defined (ACE_HAS_THREADS)
- ACE_RANDR_TYPE seed = ACE_static_cast (ACE_RANDR_TYPE,
- ACE_reinterpret_cast (unsigned long, &seed));
- return (ACE_OS::rand_r (seed) % Options::instance ()->max_msg_size ()) + 1;
-#else
- return (ACE_OS::rand () % Options::instance ()->max_msg_size ()) + 1;
-#endif /* ACE_HAS_THREADS */
-}
-
-// Recursively allocate and deallocate dynamic memory.
-
-static int
-malloc_recurse (int count)
-{
- static char default_char = 0;
-
- if (count <= 0)
- {
- if (Options::instance ()->debug ())
- {
- // Note that you'll need to #define ACE_HAS_MALLOC_STATS in
- // the main ACE config.h file and remake ACE to enable this.
- ACE_MALLOC_STATS (Malloc::instance ()->print_stats ());
- }
- }
- else
- {
- int alloc_size = gen_size ();
- void *ptr = Malloc::instance ()->malloc (alloc_size);
-
- if (ptr == 0)
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) *** malloc of size %d failed, %p\n%a",
- "malloc",
- alloc_size));
- else
- {
- ACE_OS::memset (ptr, default_char++, alloc_size);
-
- if (Options::instance ()->debug ())
- ACE_DEBUG ((LM_INFO,
- "(%P|%t) %u (alloc), size = %d\n",
- ptr,
- alloc_size));
-
- // Call ourselves recursively
- malloc_recurse (count - 1);
-
- if (Options::instance ()->debug ())
- ACE_DEBUG ((LM_INFO,
- "(%P|%t) %u (free), size = %d\n",
- ptr,
- alloc_size));
- Malloc::instance ()->free (ptr);
- }
- }
-
- return 0;
-}
-
-#if defined (ACE_HAS_THREADS)
-static void *
-worker (void *arg)
-{
- // Cast the arg to a long, first, because a pointer is the same
- // size as a long on all current ACE platforms.
- malloc_recurse ((int) (long) arg);
-
- return 0;
-}
-#endif /* ACE_HAS_THREADS */
-
-// Create the appropriate type of process/thread.
-
-static void
-spawn (void)
-{
- if (Options::instance ()->spawn_threads ())
- {
-#if defined (ACE_HAS_THREADS)
- if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (worker),
- (void *) Options::instance ()->iteration_count (),
- THR_BOUND) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n%a", "thread create failed"));
-#else
- if (Options::instance ()->spawn_count () > 1)
- ACE_ERROR ((LM_ERROR,
- "only one thread may be run in a process on this platform\n%a",
- 1));
-#endif /* ACE_HAS_THREADS */
- }
-#if !defined (ACE_WIN32)
- else if (ACE_OS::fork (Options::instance ()->program_name ()) == 0)
- {
- if (Options::instance ()->exec_slave ())
- {
- char iterations[20];
- char msg_size[20];
-
- ACE_OS::sprintf (iterations,
- "%d",
- Options::instance ()->iteration_count ());
- ACE_OS::sprintf (msg_size,
- "%d",
- Options::instance ()->max_msg_size ());
- const char *cp = 0;
-
- if (Options::instance ()->debug ())
- cp = "-d";
- else
- cp = "";
-
- const char *argv[] =
- {
- (char *) Options::instance ()->slave_name (),
- "-p",
- "-n",
- iterations,
- "-L",
- msg_size,
- cp,
- (char *) 0
- };
-
- if (ACE_OS::execv (Options::instance ()->program_name (),
- (char *const *) argv) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n", "exec failed"));
- ACE_OS::_exit (1);
- }
- else
- {
- ACE_DEBUG ((LM_INFO,
- "(%P|%t) about to recurse with iteration count = %d\n",
- Options::instance ()->iteration_count ()));
-
- malloc_recurse (Options::instance ()->iteration_count ());
- Malloc::instance ()->remove ();
- ACE_OS::exit (0);
- }
- }
-#endif /* ACE_WIN32 */
-}
-
-// Wait for all the child processes/threads to exit.
-
-static void
-wait_for_children (void)
-{
- if (Options::instance ()->spawn_threads ())
- {
-#if defined (ACE_HAS_THREADS)
- // Wait for the threads to terminate.
- ACE_Thread_Manager::instance ()->wait ();
-#else
- malloc_recurse (Options::instance ()->iteration_count ());
-#endif /* ACE_HAS_THREADS */
- }
-#if !defined (ACE_WIN32)
- else
- {
- pid_t pid;
-
- while ((pid = ACE_OS::wait (0)) != -1)
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) reaped pid = %d\n", pid));
- }
-#endif /* ACE_WIN32 */
-}
-
-extern "C" void
-handler (int)
-{
- Malloc::instance ()->remove ();
- ACE_ERROR ((LM_ERROR, "(%P|%t) removed handler\n%a", 0));
-}
-
-int
-main (int argc, char *argv[])
-{
- // Register a signal handler.
- ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT);
- ACE_UNUSED_ARG (sa);
-
- Options::instance ()->parse_args (argc, argv);
-
-#if !defined (ACE_WIN32)
- if (Options::instance ()->child ())
- {
- ACE_DEBUG ((LM_INFO,
- "(%P|%t) about to recurse with iteration count = %d, debug = %d\n",
- Options::instance ()->iteration_count ()));
-
- // We've been forked...
- malloc_recurse (Options::instance ()->iteration_count ());
- Malloc::instance ()->remove ();
- }
- else
-#endif /* ACE_WIN32 */
- {
- for (size_t i = 0;
- i < Options::instance ()->spawn_count ();
- i++)
- spawn ();
-
- wait_for_children ();
- Malloc::instance ()->remove ();
- }
- return 0;
-}
diff --git a/examples/Shared_Malloc/test_multiple_mallocs.cpp b/examples/Shared_Malloc/test_multiple_mallocs.cpp
deleted file mode 100644
index 722ad276fd1..00000000000
--- a/examples/Shared_Malloc/test_multiple_mallocs.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-// $Id$
-
-// Test the capability of <ACE_Malloc> to handle multiple mallocs
-// rooted at different base addresses.
-
-#include "ace/Malloc.h"
-#include "ace/Synch.h"
-#include "ace/Auto_Ptr.h"
-
-ACE_RCSID(Shared_Malloc, test_multiple_mallocs, "$Id$")
-
-typedef ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex> MALLOC;
-
-#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
-// The Address for the shared memory mapped files defaults to wherever
-// the OS wants to map it.
-const void *REQUEST_BASE_ADDR = 0;
-const void *RESPONSE_BASE_ADDR = 0;
-#else
-// Default address for shared memory mapped files and SYSV shared
-// memory (defaults to 64 M).
-const void *REQUEST_BASE_ADDR = ((void *) (64 * 1024 * 1024));
-
-// Default address for shared memory mapped files and SYSV shared
-// memory (defaults to 64 M).
-const void *RESPONSE_BASE_ADDR = ((void *) (128 * 1024 * 1024));
-#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
-
-static const char *request_string = "hello from request repository";
-static const char *response_string = "hello from response repository";
-
-int
-main (int, char *[])
-{
- ACE_MMAP_Memory_Pool_Options request_options (REQUEST_BASE_ADDR);
-
- // Create an adapter version of an allocator.
- ACE_Allocator_Adapter<MALLOC> *adapter_ptr = 0;
- ACE_NEW_RETURN (adapter_ptr,
- ACE_Allocator_Adapter<MALLOC> ("request_file",
- "request_lock",
- &request_options),
- 1);
-
- auto_ptr <ACE_Allocator_Adapter<MALLOC> > shmem_request (adapter_ptr);
- ACE_MMAP_Memory_Pool_Options response_options (RESPONSE_BASE_ADDR);
-
- MALLOC *ptr = 0;
- // Create a non-adapter version of an allocator.
- ACE_NEW_RETURN (ptr,
- MALLOC ("response_file",
- "response_lock",
- &response_options),
- 1);
- auto_ptr <MALLOC> shmem_response (ptr);
- void *data = 0;
-
- // If we find "foo" then we're running the "second" time, so we must
- // release the resources.
- if (shmem_request->find ("foo",
- data) == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "%s\n",
- data));
- shmem_request->remove ();
- }
-
- // This is the first time in, so we allocate the memory and bind it
- // to the name "foo".
- else
- {
- ACE_ALLOCATOR_RETURN (data,
- shmem_request->malloc (ACE_OS::strlen (request_string) + 1),
- 1);
- ACE_OS::strcpy ((char *) data,
- request_string);
-
- if (shmem_request->bind ("foo",
- data) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "bind"),
- 1);
- }
- data = 0;
-
- // If we find "foo" then we're running the "second" time, so we must
- // release the resources.
- if (shmem_response->find ("foo",
- data) == 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "%s\n",
- data));
- shmem_response->remove ();
- ACE_DEBUG ((LM_DEBUG,
- "all shared memory resources have been released\n"));
- }
-
- // This is the first time in, so we allocate the memory and bind it
- // to the name "foo".
- else
- {
- ACE_ALLOCATOR_RETURN (data,
- shmem_response->malloc (ACE_OS::strlen (response_string) + 1),
- 1);
- ACE_OS::strcpy ((char *) data,
- response_string);
-
- if (shmem_response->bind ("foo",
- data) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n",
- "bind"));
- else
- ACE_DEBUG ((LM_DEBUG,
- "Run again to see results and release resources.\n"));
- }
-
- return 0;
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class auto_ptr <ACE_Allocator_Adapter<MALLOC> >;
-template class ACE_Auto_Basic_Ptr<ACE_Allocator_Adapter<MALLOC> >;
-template class auto_ptr <MALLOC>;
-template class ACE_Auto_Basic_Ptr<MALLOC>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate auto_ptr <ACE_Allocator_Adapter<MALLOC> >
-#pragma instantiate ACE_Auto_Basic_Ptr<ACE_Allocator_Adapter<MALLOC> >
-#pragma instantiate auto_ptr <MALLOC>
-#pragma instantiate ACE_Auto_Basic_Ptr<MALLOC>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/examples/Shared_Malloc/test_persistence.cpp b/examples/Shared_Malloc/test_persistence.cpp
deleted file mode 100644
index bd248646180..00000000000
--- a/examples/Shared_Malloc/test_persistence.cpp
+++ /dev/null
@@ -1,347 +0,0 @@
-// $Id$
-
-// Test the persistence capabilities of <ACE_Malloc> when configured
-// for mmap-based shared memory management.
-
-// This examples uses scanf to read user inputs from stdin into fixed
-// sized buffers. This may cause buffers to overrun.
-
-#include "ace/Malloc.h"
-#include "ace/streams.h"
-
-ACE_RCSID(Shared_Malloc, test_persistence, "$Id$")
-
-typedef ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex> MALLOC;
-typedef ACE_Malloc_LIFO_Iterator <ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex> MALLOC_LIFO_ITERATOR;
-typedef ACE_Malloc_FIFO_Iterator <ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex> MALLOC_FIFO_ITERATOR;
-
-// Shared memory manager.
-static MALLOC *shmem_allocator = 0;
-
-// Backing store name.
-static char backing_store[MAXPATHLEN + 1] = "";
-
-class Employee
-{
-public:
- Employee (void): name_ (0), id_ (0) {}
-
- Employee (const char *name, u_long id) : id_ (id)
- {
- size_t len = ACE_OS::strlen (name) + 1;
- this->name_ = ACE_reinterpret_cast (char *,
- shmem_allocator->malloc (len));
- ACE_OS::strcpy (this->name_, name);
- }
-
- ~Employee (void) { shmem_allocator->free (this->name_); }
-
- const char *name (void) const { return this->name_; }
-
- void name (const char *name)
- {
- if (this->name_)
- shmem_allocator->free (this->name_);
-
- size_t len = ACE_OS::strlen (name) + 1;
- this->name_ = ACE_reinterpret_cast (char *,
- shmem_allocator->malloc (len));
- ACE_OS::strcpy (this->name_, name);
- }
-
- u_long id (void) const { return id_; }
-
- void id (u_long id) { id_ = id; }
-
- void *operator new (size_t)
- {
- return shmem_allocator->malloc (sizeof (Employee));
- }
-
- void operator delete (void *pointer) { shmem_allocator->free (pointer); }
-
-private:
- char *name_;
- // Employee name.
-
- u_long id_;
- // Employee ID.
-};
-
-class GUI_Handler
-{
-public:
- GUI_Handler (void) { menu (); }
-
- ~GUI_Handler (void)
- {
- MALLOC::MEMORY_POOL &pool =
- shmem_allocator->memory_pool ();
- pool.sync ();
- }
-
- int service(void)
- {
- char option[BUFSIZ];
- char buf1[BUFSIZ];
- char buf2[BUFSIZ];
-
- if (::scanf ("%s", option) <= 0)
- {
- ACE_ERROR ((LM_ERROR,
- "try again\n"));
- return 0;
- }
-
- int result = 0;
- switch (option[0])
- {
- case 'I' :
- case 'i' :
- if (::scanf ("%s %s", buf1, buf2) <= 0)
- break;
- result = insert_employee (buf1,
- ACE_OS::atoi (buf2));
- break;
- case 'F' :
- case 'f' :
- if (::scanf ("%s", buf1) <= 0)
- break;
- result = find_employee (buf1);
- break;
- case 'D' :
- case 'd' :
- if (::scanf ("%s", buf1) <= 0)
- break;
- result = delete_employee (buf1);
- break;
- case 'L' :
- case 'l' :
- result = list_employees ();
- break;
- case 'Q' :
- case 'q' :
- return -1;
- ACE_NOTREACHED(break);
- default :
- cout << "unrecognized command" << endl;
- }
- if (result == 0)
- cout << "Last operation was successful!!" << endl;
- else
- cout << "Last operation failed!! " << endl;
-
- menu ();
-
- return 0;
- }
-
- void menu(void)
- {
- cout << endl;
- cout << "\t************************** " << endl;
- cout << "\tThe employee database menu " << endl;
- cout << endl;
- cout << "\t<I> Insert <name> <id> " << endl;
- cout << "\t<D> Delete <name> " << endl;
- cout << "\t<F> Find <name> " << endl;
- cout << endl;
- cout << "\t<L> List all employees " << endl;
- cout << endl;
- cout << "\t<Q> Quit " << endl;
- cout << "\t************************** " << endl;
- }
-
-private:
- int insert_employee (const char *name,
- u_long id);
- int find_employee (const char *name);
- int list_employees (void);
- int delete_employee (const char *name);
-};
-
-int
-GUI_Handler::insert_employee (const char *name,
- u_long id)
-{
- if (find_employee (name) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Employee already exists\n"),
- -1);
-
- Employee *new_employee = 0;
-
- ACE_NEW_RETURN (new_employee,
- Employee (name, id),
- -1);
-
- if (shmem_allocator->bind (name,
- new_employee) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "bind failed\n"),
- -1);
- return 0;
-}
-
-int
-GUI_Handler::find_employee (const char *name)
-{
- void *temp;
-
- if (shmem_allocator->find (name,
- temp) == 0)
- {
- Employee *employee = ACE_reinterpret_cast (Employee *,
- temp);
-
- ACE_DEBUG ((LM_DEBUG,
- "The following employee was found.......\n\n"));
- ACE_DEBUG ((LM_DEBUG,
- "Employee name: %s\nEmployee id: %d\n",
- employee->name (),
- employee->id ()));
- return 0;
- }
-
- return -1;
-}
-
-int
-GUI_Handler::list_employees (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "The following employees were found.......\n\n"));
-
- {
- ACE_DEBUG ((LM_DEBUG,
- "LIFO order:\n"));
- MALLOC_LIFO_ITERATOR iterator (*shmem_allocator);
-
- for (void *temp = 0;
- iterator.next (temp) != 0;
- iterator.advance ())
- {
- Employee *employee = ACE_reinterpret_cast (Employee *,
- temp);
- ACE_DEBUG ((LM_DEBUG,
- "Employee name: %s\nEmployee id: %d\n",
- employee->name (),
- employee->id ()));
- }
- }
-
- {
- ACE_DEBUG ((LM_DEBUG,
- "FIFO order:\n"));
- MALLOC_FIFO_ITERATOR iterator (*shmem_allocator);
-
- for (void *temp = 0;
- iterator.next (temp) != 0;
- iterator.advance ())
- {
- Employee *employee = ACE_reinterpret_cast (Employee *,
- temp);
- ACE_DEBUG ((LM_DEBUG,
- "Employee name: %s\nEmployee id: %d\n",
- employee->name (),
- employee->id ()));
- }
- }
- return 0;
-}
-
-int
-GUI_Handler::delete_employee (const char *name)
-{
- void *temp;
-
- if (shmem_allocator->unbind (name,
- temp) == 0)
- {
- Employee *employee = ACE_reinterpret_cast (Employee *,
- temp);
-
- ACE_DEBUG ((LM_DEBUG,
- "The following employee was found and deleted.......\n\n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "Employee name: %s\nEmployee id: %d\n",
- employee->name (),
- employee->id ()));
-
- delete employee;
- return 0;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "There is no employee with name %s",
- name));
- return -1;
-}
-
-void
-parse_args (int argc, char *argv[])
-{
- if (argc > 1)
- ACE_OS::strcpy (backing_store, argv[1]);
-}
-
-int
-main (int argc, char *argv[])
-{
- parse_args (argc, argv);
-
- if (ACE_OS::strcmp (backing_store, "") == 0)
- {
-#if defined (ACE_DEFAULT_BACKING_STORE)
- // Create a temporary file.
- ACE_OS::strcpy (backing_store,
- ACE_DEFAULT_BACKING_STORE);
-#else /* ACE_DEFAULT_BACKING_STORE */
- if (ACE::get_temp_dir (backing_store,
- MAXPATHLEN - 17) == -1) // -17 for ace-malloc-XXXXXX
- {
- ACE_ERROR ((LM_ERROR,
- "Temporary path too long, "
- "defaulting to current directory\n"));
- backing_store[0] = 0;
- }
-
- // Add the filename to the end
- ACE_OS::strcat (backing_store, "ace-malloc-XXXXXX");
-
-#endif /* ACE_DEFAULT_BACKING_STORE */
- }
-
- ACE_NEW_RETURN (shmem_allocator,
- MALLOC (backing_store),
- -1);
-
- GUI_Handler handler;
-
- for (;;)
- if (handler.service () == -1)
- {
- ACE_DEBUG ((LM_DEBUG,
- "closing down ....\n"));
- break;
- }
-
- return 0;
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-// The following instantiation is in ace/System_Time.cpp:
-// template class ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex>;
-template class ACE_Malloc_FIFO_Iterator <ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex>;
-template class ACE_Malloc_LIFO_Iterator <ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex>;
-template class ACE_Malloc_FIFO_Iterator_T <ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex, ACE_Control_Block>;
-template class ACE_Malloc_LIFO_Iterator_T <ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex, ACE_Control_Block>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-// The following instantiation is in ace/System_Time.cpp:
-// #pragma instantiate ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex>
-#pragma instantiate ACE_Malloc_FIFO_Iterator <ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex>
-#pragma instantiate ACE_Malloc_LIFO_Iterator <ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex>
-#pragma instantiate ACE_Malloc_FIFO_Iterator_T <ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex, ACE_Control_Block>
-#pragma instantiate ACE_Malloc_LIFO_Iterator_T <ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex, ACE_Control_Block>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/examples/Shared_Malloc/test_position_independent_malloc.cpp b/examples/Shared_Malloc/test_position_independent_malloc.cpp
deleted file mode 100644
index 3eb5934c5ef..00000000000
--- a/examples/Shared_Malloc/test_position_independent_malloc.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-// $Id$
-
-// Test the capability of the "position-independent" <ACE_Malloc> to
-// handle a single malloc that can be rooted at different base
-// addresses each time it's used. The actual backing store used by
-// <ACE_Malloc> is located in a memory-mapped file.
-
-#include "ace/Malloc.h"
-#include "ace/Based_Pointer_T.h"
-#include "ace/Get_Opt.h"
-#include "ace/Synch.h"
-#include "ace/Auto_Ptr.h"
-#include "test_position_independent_malloc.h"
-
-ACE_RCSID(Shared_Malloc, test_multiple_mallocs, "$Id$")
-
-#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
-typedef ACE_PI_Control_Block CONTROL_BLOCK;
-#else
-typedef ACE_Control_Block CONTROL_BLOCK;
-#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
-
-typedef ACE_Malloc_T <ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, CONTROL_BLOCK> MALLOC;
-
-// Default address for memory-mapped files.
-static void *base_addr = ACE_DEFAULT_BASE_ADDR;
-
-static void
-print (Test_Data *data)
-{
- for (Test_Data *t = data; t != 0; t = t->next_)
- {
- ACE_DEBUG ((LM_DEBUG,
- "<<<<\ni1_ = %d, i2_ = %d, i3_ = %d\n",
- t->i1_,
- t->i2_,
- t->i3_));
- ACE_DEBUG ((LM_DEBUG,
- "*t->bpl_ = %d, t->long_test_->array_[0] = %d\n>>>>\n",
- *t->long_test_->bpl_,
- t->long_test_->array_[0]));
- }
-}
-
-static void *
-initialize (MALLOC *allocator)
-{
- void *ptr;
- ACE_ALLOCATOR_RETURN (ptr,
- allocator->malloc (sizeof (Test_Data)),
- 0);
- Test_Data *data1 = new (ptr) Test_Data;
-
- data1->i1_ = 111;
- data1->i2_ = 222;
- data1->i3_ = 333;
-
- void *gap = 0;
- ACE_ALLOCATOR_RETURN (gap,
- allocator->malloc (sizeof (256)),
- 0);
-
- allocator->free (gap);
-
- ACE_ALLOCATOR_RETURN (ptr,
- allocator->malloc (sizeof (Test_Data)),
- 0);
- Test_Data *data2 = new (ptr) Test_Data;
-
- data1->next_ = 0;
- data1->i1_ = 111;
- data1->i2_ = 222;
- data1->i3_ = 333;
- data2->next_ = data1;
- data2->i1_ = -111;
- data2->i2_ = -222;
- data2->i3_ = -333;
-
- // Test in shared memory using long (array/pointer)
- ACE_ALLOCATOR_RETURN (ptr,
- allocator->malloc (sizeof (Long_Test)),
- 0);
- Long_Test *lt = new (ptr) Long_Test;
-
- lt->array_[0] = 1000;
- lt->array_[1] = 1001;
- lt->array_[2] = 1002;
- lt->array_[3] = 1003;
- lt->array_[4] = 1004;
- lt->bpl_ = lt->array_;
-
- data1->long_test_= lt;
-
- ACE_ASSERT (*lt->bpl_ == 1000);
- ACE_ASSERT (lt->bpl_[3] == 1003);
-
- ACE_ALLOCATOR_RETURN (ptr,
- allocator->malloc (sizeof (Long_Test)),
- 0);
- lt = new (ptr) Long_Test;
-
- lt->array_[0] = 2000;
- lt->array_[1] = 2001;
- lt->array_[2] = 2002;
- lt->array_[3] = 2003;
- lt->array_[4] = 2004;
- lt->bpl_ = lt->array_;
-
- data2->long_test_= lt;
-
- ACE_ASSERT (*lt->bpl_ == 2000);
- ACE_ASSERT (lt->bpl_[4] == 2004);
-
- return data2;
-}
-
-static void
-parse_args (int argc, char *argv[])
-{
- ACE_Get_Opt get_opt (argc, argv, "a:T");
-
- for (int c;
- (c = get_opt ()) != -1;
- )
- {
- switch (c)
- {
- case 'a':
- // Override the default base address.
- base_addr = (void *) ACE_OS::atoi (get_opt.optarg);
- break;
- case 'T':
- ACE_Trace::start_tracing ();
- break;
- }
- }
-}
-
-int
-main (int argc, char *argv[])
-{
- parse_args (argc, argv);
-
- ACE_MMAP_Memory_Pool_Options options (base_addr);
-
- // Create an allocator.
- MALLOC *ptr;
- ACE_NEW_RETURN (ptr,
- MALLOC ("test_file",
- "test_lock",
- &options),
- 1);
- auto_ptr <MALLOC> allocator (ptr);
- void *data = 0;
-
- // This is the first time in, so we allocate the memory and bind it
- // to the name "foo".
- if (allocator->find ("foo",
- data) == -1)
- {
- data = initialize (allocator.get ());
-
- if (allocator->bind ("foo",
- data) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "bind"),
- 1);
-
- ACE_DEBUG ((LM_DEBUG,
- "Run again to see results and release resources.\n"));
- }
- // If we find "foo" then we're running the "second" time, so we must
- // release the resources.
- else
- {
- print ((Test_Data *) data);
- allocator->free (data);
- allocator->remove ();
- ACE_DEBUG ((LM_DEBUG,
- "all resources released\n"));
- }
-
- return 0;
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Based_Pointer<Test_Data>;
-template class ACE_Based_Pointer_Basic<Test_Data>;
-template class ACE_Based_Pointer_Basic<long>;
-template class ACE_Based_Pointer_Basic<Long_Test>;
-template class ACE_Based_Pointer<Long_Test>;
-template class auto_ptr <MALLOC>;
-template class ACE_Auto_Basic_Ptr<MALLOC>;
-#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
-template class ACE_Malloc_T <ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, CONTROL_BLOCK>;
-#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Based_Pointer<Test_Data>
-#pragma instantiate ACE_Based_Pointer_Basic<Test_Data>
-#pragma instantiate ACE_Based_Pointer_Basic<long>
-#pragma instantiate ACE_Based_Pointer_Basic<Long_Test>
-#pragma instantiate ACE_Based_Pointer_Basic<Long>
-#pragma instantiate auto_ptr <MALLOC>
-#pragma instantiate ACE_Auto_Basic_Ptr<MALLOC>
-#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
-#pragma instantiate ACE_Malloc_T <ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, CONTROL_BLOCK>
-#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/examples/Shared_Malloc/test_position_independent_malloc.h b/examples/Shared_Malloc/test_position_independent_malloc.h
deleted file mode 100644
index 243df410234..00000000000
--- a/examples/Shared_Malloc/test_position_independent_malloc.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// $Id$
-//
-// Define struct used in test_position_independent_malloc.cpp - needs
-// to be in a separate file for template generation on AIX IBM C++.
-
-#ifndef __TEST_POSITION_INDEPENDENT_MALLOC_H
-#define __TEST_POSITION_INDEPENDENT_MALLOC_H
-
-// Some test data.
-struct Long_Test
-{
- ACE_Based_Pointer_Basic<long> bpl_;
- long array_[10];
-};
-
-// Some more test data.
-struct Test_Data
-{
- int i1_;
- int i2_;
- int i3_;
- ACE_Based_Pointer<Test_Data> next_;
- ACE_Based_Pointer<Long_Test> long_test_;
-};
-
-#endif /* __TEST_POSITION_INDEPENDENT_MALLOC */