dropped ExcMmgr and enhanced Mmgr to incoporate both exception raising and error returing

This commit is contained in:
hyung-hwan 2015-02-02 13:30:33 +00:00
parent 8fc288e750
commit bb1d41d4d0
15 changed files with 90 additions and 103 deletions

View File

@ -390,7 +390,7 @@ LIBQSECMNXX_CXXFLAGS = $(____DOS_CFLAG_p) -i=..\..\include $(CPPFLAGS_BUILD) &
LIBQSECMNXX_OBJECTS = &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_StdMmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_ExcMmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_HeapMmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mmged.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mpool.obj
LIBQSEAWKXX_CXXFLAGS = $(____DOS_CFLAG_p) -i=..\..\include $(CPPFLAGS_BUILD) &
@ -944,7 +944,7 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mmgr
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_StdMmgr.obj : .AUTODEPEND ..\..\lib\cmn\StdMmgr.cpp
$(CXX) -bt=dos -zq -fo=$^@ $(LIBQSECMNXX_CXXFLAGS) $<
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_ExcMmgr.obj : .AUTODEPEND ..\..\lib\cmn\ExcMmgr.cpp
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_HeapMmgr.obj : .AUTODEPEND ..\..\lib\cmn\HeapMmgr.cpp
$(CXX) -bt=dos -zq -fo=$^@ $(LIBQSECMNXX_CXXFLAGS) $<
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mmged.obj : .AUTODEPEND ..\..\lib\cmn\Mmged.cpp

View File

@ -670,7 +670,7 @@ DLLQSECMNXX_CXXFLAGS = -bd -i=..\..\include $(CPPFLAGS_BUILD) $(CPPFLAGS_CHAR) &
DLLQSECMNXX_OBJECTS = &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_Mmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_StdMmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_ExcMmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_HeapMmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_Mmged.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_Mpool.obj
LIBQSECMNXX_CXXFLAGS = -i=..\..\include $(CPPFLAGS_BUILD) $(CPPFLAGS_CHAR) &
@ -680,7 +680,7 @@ LIBQSECMNXX_CXXFLAGS = -i=..\..\include $(CPPFLAGS_BUILD) $(CPPFLAGS_CHAR) &
LIBQSECMNXX_OBJECTS = &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_StdMmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_ExcMmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_HeapMmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mmged.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mpool.obj
DLLQSEAWKXX_CXXFLAGS = -bd -i=..\..\include $(CPPFLAGS_BUILD) $(CPPFLAGS_CHAR) &
@ -1902,7 +1902,7 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllq
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_StdMmgr.obj : .AUTODEPEND ..\..\lib\cmn\StdMmgr.cpp
$(CXX) -bt=os2 -zq -fo=$^@ $(DLLQSECMNXX_CXXFLAGS) $<
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_ExcMmgr.obj : .AUTODEPEND ..\..\lib\cmn\ExcMmgr.cpp
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_HeapMmgr.obj : .AUTODEPEND ..\..\lib\cmn\HeapMmgr.cpp
$(CXX) -bt=os2 -zq -fo=$^@ $(DLLQSECMNXX_CXXFLAGS) $<
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_Mmged.obj : .AUTODEPEND ..\..\lib\cmn\Mmged.cpp
@ -1917,7 +1917,7 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libq
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_StdMmgr.obj : .AUTODEPEND ..\..\lib\cmn\StdMmgr.cpp
$(CXX) -bt=os2 -zq -fo=$^@ $(LIBQSECMNXX_CXXFLAGS) $<
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_ExcMmgr.obj : .AUTODEPEND ..\..\lib\cmn\ExcMmgr.cpp
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_HeapMmgr.obj : .AUTODEPEND ..\..\lib\cmn\HeapMmgr.cpp
$(CXX) -bt=os2 -zq -fo=$^@ $(LIBQSECMNXX_CXXFLAGS) $<
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mmged.obj : .AUTODEPEND ..\..\lib\cmn\Mmged.cpp

View File

@ -306,7 +306,7 @@
<set var="SOURCES_LIBQSECMNXX">
Mmgr.cpp
StdMmgr.cpp
ExcMmgr.cpp
HeapMmgr.cpp
Mmged.cpp
Mpool.cpp
</set>

View File

@ -456,7 +456,7 @@ DLLQSECMNXX_CXXFLAGS = -I$(BCCDIR)\include -I..\..\include $(CPPFLAGS_BUILD) \
DLLQSECMNXX_OBJECTS = \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_Mmgr.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_StdMmgr.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_ExcMmgr.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_HeapMmgr.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_Mmged.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_Mpool.obj
LIBQSECMNXX_CXXFLAGS = -I$(BCCDIR)\include -I..\..\include $(CPPFLAGS_BUILD) \
@ -466,7 +466,7 @@ LIBQSECMNXX_CXXFLAGS = -I$(BCCDIR)\include -I..\..\include $(CPPFLAGS_BUILD) \
LIBQSECMNXX_OBJECTS = \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mmgr.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_StdMmgr.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_ExcMmgr.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_HeapMmgr.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mmged.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mpool.obj
DLLQSEAWKXX_CXXFLAGS = -I$(BCCDIR)\include -I..\..\include $(CPPFLAGS_BUILD) \
@ -1850,8 +1850,8 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllq
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_StdMmgr.obj: ..\..\lib\cmn\StdMmgr.cpp
$(CXX) -q -c -P -o$@ $(DLLQSECMNXX_CXXFLAGS) ..\..\lib\cmn\StdMmgr.cpp
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_ExcMmgr.obj: ..\..\lib\cmn\ExcMmgr.cpp
$(CXX) -q -c -P -o$@ $(DLLQSECMNXX_CXXFLAGS) ..\..\lib\cmn\ExcMmgr.cpp
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_HeapMmgr.obj: ..\..\lib\cmn\HeapMmgr.cpp
$(CXX) -q -c -P -o$@ $(DLLQSECMNXX_CXXFLAGS) ..\..\lib\cmn\HeapMmgr.cpp
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_Mmged.obj: ..\..\lib\cmn\Mmged.cpp
$(CXX) -q -c -P -o$@ $(DLLQSECMNXX_CXXFLAGS) ..\..\lib\cmn\Mmged.cpp
@ -1865,8 +1865,8 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libq
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_StdMmgr.obj: ..\..\lib\cmn\StdMmgr.cpp
$(CXX) -q -c -P -o$@ $(LIBQSECMNXX_CXXFLAGS) ..\..\lib\cmn\StdMmgr.cpp
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_ExcMmgr.obj: ..\..\lib\cmn\ExcMmgr.cpp
$(CXX) -q -c -P -o$@ $(LIBQSECMNXX_CXXFLAGS) ..\..\lib\cmn\ExcMmgr.cpp
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_HeapMmgr.obj: ..\..\lib\cmn\HeapMmgr.cpp
$(CXX) -q -c -P -o$@ $(LIBQSECMNXX_CXXFLAGS) ..\..\lib\cmn\HeapMmgr.cpp
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mmged.obj: ..\..\lib\cmn\Mmged.cpp
$(CXX) -q -c -P -o$@ $(LIBQSECMNXX_CXXFLAGS) ..\..\lib\cmn\Mmged.cpp

View File

@ -463,7 +463,7 @@ DLLQSECMNXX_CXXFLAGS = /MD$(__DEBUG_INFO_28) /DWIN32 /I..\..\include \
DLLQSECMNXX_OBJECTS = \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_Mmgr.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_StdMmgr.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_ExcMmgr.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_HeapMmgr.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_Mmged.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_Mpool.obj
LIBQSECMNXX_CXXFLAGS = /MD$(__DEBUG_INFO_28) /DWIN32 /I..\..\include \
@ -475,7 +475,7 @@ LIBQSECMNXX_CXXFLAGS = /MD$(__DEBUG_INFO_28) /DWIN32 /I..\..\include \
LIBQSECMNXX_OBJECTS = \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mmgr.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_StdMmgr.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_ExcMmgr.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_HeapMmgr.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mmged.obj \
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mpool.obj
DLLQSEAWKXX_CXXFLAGS = /MD$(__DEBUG_INFO_28) /DWIN32 /I..\..\include \
@ -1929,8 +1929,8 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllq
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_StdMmgr.obj: ..\..\lib\cmn\StdMmgr.cpp
$(CXX) /c /nologo /TP /Fo$@ $(DLLQSECMNXX_CXXFLAGS) ..\..\lib\cmn\StdMmgr.cpp
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_ExcMmgr.obj: ..\..\lib\cmn\ExcMmgr.cpp
$(CXX) /c /nologo /TP /Fo$@ $(DLLQSECMNXX_CXXFLAGS) ..\..\lib\cmn\ExcMmgr.cpp
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_HeapMmgr.obj: ..\..\lib\cmn\HeapMmgr.cpp
$(CXX) /c /nologo /TP /Fo$@ $(DLLQSECMNXX_CXXFLAGS) ..\..\lib\cmn\HeapMmgr.cpp
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_Mmged.obj: ..\..\lib\cmn\Mmged.cpp
$(CXX) /c /nologo /TP /Fo$@ $(DLLQSECMNXX_CXXFLAGS) ..\..\lib\cmn\Mmged.cpp
@ -1944,8 +1944,8 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libq
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_StdMmgr.obj: ..\..\lib\cmn\StdMmgr.cpp
$(CXX) /c /nologo /TP /Fo$@ $(LIBQSECMNXX_CXXFLAGS) ..\..\lib\cmn\StdMmgr.cpp
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_ExcMmgr.obj: ..\..\lib\cmn\ExcMmgr.cpp
$(CXX) /c /nologo /TP /Fo$@ $(LIBQSECMNXX_CXXFLAGS) ..\..\lib\cmn\ExcMmgr.cpp
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_HeapMmgr.obj: ..\..\lib\cmn\HeapMmgr.cpp
$(CXX) /c /nologo /TP /Fo$@ $(LIBQSECMNXX_CXXFLAGS) ..\..\lib\cmn\HeapMmgr.cpp
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mmged.obj: ..\..\lib\cmn\Mmged.cpp
$(CXX) /c /nologo /TP /Fo$@ $(LIBQSECMNXX_CXXFLAGS) ..\..\lib\cmn\Mmged.cpp

View File

@ -659,7 +659,7 @@ DLLQSECMNXX_CXXFLAGS = -bd -i=..\..\include $(CPPFLAGS_BUILD) $(CPPFLAGS_CHAR) &
DLLQSECMNXX_OBJECTS = &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_Mmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_StdMmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_ExcMmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_HeapMmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_Mmged.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_Mpool.obj
LIBQSECMNXX_CXXFLAGS = -i=..\..\include $(CPPFLAGS_BUILD) $(CPPFLAGS_CHAR) &
@ -669,7 +669,7 @@ LIBQSECMNXX_CXXFLAGS = -i=..\..\include $(CPPFLAGS_BUILD) $(CPPFLAGS_CHAR) &
LIBQSECMNXX_OBJECTS = &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_StdMmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_ExcMmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_HeapMmgr.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mmged.obj &
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mpool.obj
DLLQSEAWKXX_CXXFLAGS = -bd -i=..\..\include $(CPPFLAGS_BUILD) $(CPPFLAGS_CHAR) &
@ -1891,7 +1891,7 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllq
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_StdMmgr.obj : .AUTODEPEND ..\..\lib\cmn\StdMmgr.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(DLLQSECMNXX_CXXFLAGS) $<
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_ExcMmgr.obj : .AUTODEPEND ..\..\lib\cmn\ExcMmgr.cpp
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_HeapMmgr.obj : .AUTODEPEND ..\..\lib\cmn\HeapMmgr.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(DLLQSECMNXX_CXXFLAGS) $<
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmnxx_Mmged.obj : .AUTODEPEND ..\..\lib\cmn\Mmged.cpp
@ -1906,7 +1906,7 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libq
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_StdMmgr.obj : .AUTODEPEND ..\..\lib\cmn\StdMmgr.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(LIBQSECMNXX_CXXFLAGS) $<
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_ExcMmgr.obj : .AUTODEPEND ..\..\lib\cmn\ExcMmgr.cpp
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_HeapMmgr.obj : .AUTODEPEND ..\..\lib\cmn\HeapMmgr.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(LIBQSECMNXX_CXXFLAGS) $<
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmnxx_Mmged.obj : .AUTODEPEND ..\..\lib\cmn\Mmged.cpp

View File

@ -1,56 +0,0 @@
/*
* $Id$
*
Copyright (c) 2006-2014 Chung, Hyung-Hwan. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _QSE_CMN_EXCMMGR_HPP_
#define _QSE_CMN_EXCMMGR_HPP_
#include <qse/cmn/Mmgr.hpp>
/////////////////////////////////
QSE_BEGIN_NAMESPACE(QSE)
/////////////////////////////////
/// The ExcMmgr class implements the memory manager interface that
/// raises an exception upon failure. You can use the StdMmgr class
/// if #QSE_NULL should be returned upon failure.
class QSE_EXPORT ExcMmgr: public Mmgr
{
public:
void* allocMem (qse_size_t n);
void* reallocMem (void* ptr, qse_size_t n);
void freeMem (void* ptr);
/// The getInstance() function returns the stock instance of the StdMmgr
/// class.
static ExcMmgr* getInstance();
};
/////////////////////////////////
QSE_END_NAMESPACE(QSE)
/////////////////////////////////
#endif

View File

@ -66,6 +66,9 @@ public:
qse_size_t load_factor = 75,
qse_size_t mpb_size = 0): Mmged(mmgr)
{
if (node_capacity <= 0) node_capacity = 1;
if (load_factor < 20) load_factor = 20;
this->nodes = QSE_NULL;
this->node_capacity = 0;
this->datum_list = QSE_NULL;
@ -77,7 +80,7 @@ public:
// Node* is a plain type that doesn't have any constructors and destructors.
// it should be safe to call the memory manager bypassing the new operator.
//this->nodes = new Node*[total_count];
this->nodes = (Node**)this->getMmgr()->allocMem (QSE_SIZEOF(Node*) * total_count);
this->nodes = (Node**)this->getMmgr()->allocate (QSE_SIZEOF(Node*) * total_count);
// NOTE: something wil go wrong if the memory manager doesn't raise an exception
// upon memory allocation failure. Make sure to use a memory allocation
@ -95,7 +98,7 @@ public:
{
if (this->nodes)
{
this->getMmgr()->freeMem (this->nodes); //delete[] this->nodes;
this->getMmgr()->dispose (this->nodes); //delete[] this->nodes;
this->nodes = QSE_NULL;
this->node_capacity = 0;
}
@ -123,7 +126,7 @@ public:
{
qse_size_t total_count = list.node_capacity << 1;
//this->nodes = new Node*[total_count];
this->nodes = (Node**)this->getMmgr()->allocMem (QSE_SIZEOF(Node*) * total_count);
this->nodes = (Node**)this->getMmgr()->allocate (QSE_SIZEOF(Node*) * total_count);
this->node_capacity = list.node_capacity;
for (qse_size_t i = 0; i < total_count; i++)
@ -139,7 +142,7 @@ public:
{
if (this->nodes)
{
this->getMmgr()->freeMem (this->nodes); //delete[] this->nodes;
this->getMmgr()->dispose (this->nodes); //delete[] this->nodes;
this->nodes = QSE_NULL;
this->node_capacity = 0;
}
@ -176,7 +179,7 @@ public:
~HashList ()
{
this->clear ();
if (this->nodes) this->getMmgr()->freeMem (this->nodes); //delete[] this->nodes;
if (this->nodes) this->getMmgr()->dispose (this->nodes); //delete[] this->nodes;
if (this->datum_list) this->free_datum_list ();
}

View File

@ -51,7 +51,7 @@ pkginclude_HEADERS = \
if ENABLE_CXX
pkginclude_HEADERS += \
Mmgr.hpp StdMmgr.hpp ExcMmgr.hpp HeapMmgr.hpp Mmged.hpp \
Mmgr.hpp StdMmgr.hpp HeapMmgr.hpp Mmged.hpp \
Mpool.hpp Mpoolable.hpp LinkedList.hpp HashList.hpp
endif

View File

@ -51,7 +51,7 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@ENABLE_CXX_TRUE@am__append_1 = \
@ENABLE_CXX_TRUE@ Mmgr.hpp StdMmgr.hpp ExcMmgr.hpp HeapMmgr.hpp Mmged.hpp \
@ENABLE_CXX_TRUE@ Mmgr.hpp StdMmgr.hpp HeapMmgr.hpp Mmged.hpp \
@ENABLE_CXX_TRUE@ Mpool.hpp Mpoolable.hpp LinkedList.hpp HashList.hpp
subdir = include/qse/cmn
@ -90,8 +90,8 @@ am__pkginclude_HEADERS_DIST = alg.h chr.h cp949.h cp950.h dir.h dll.h \
lda.h main.h map.h mb8.h mbwc.h mem.h mux.h nwad.h nwif.h \
nwio.h oht.h opt.h path.h pio.h pma.h rbt.h rex.h sck.h sio.h \
sll.h slmb.h str.h task.h time.h tio.h tmr.h tre.h uni.h uri.h \
utf8.h xma.h Mmgr.hpp StdMmgr.hpp ExcMmgr.hpp HeapMmgr.hpp \
Mmged.hpp Mpool.hpp Mpoolable.hpp LinkedList.hpp HashList.hpp
utf8.h xma.h Mmgr.hpp StdMmgr.hpp HeapMmgr.hpp Mmged.hpp \
Mpool.hpp Mpoolable.hpp LinkedList.hpp HashList.hpp
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \

View File

@ -41,6 +41,12 @@ QSE_BEGIN_NAMESPACE(QSE)
/// #qse_mmgr_t type. Using the class over the primitive type enables you to
/// write code in more object-oriented fashion. An inheriting class should
/// implement three pure virtual functions.
///
/// You are free to call allocMem(), reallocMem(), and freeMem() in C++ context
/// where no exception raising is desired. If you want an exception to be
/// raised upon memory allocation errors, you can call allocate(), reallocate(),
/// dispose() instead.
///
///
class QSE_EXPORT Mmgr: public qse_mmgr_t
{
@ -50,11 +56,15 @@ public:
QSE_EXCEPTION (MemoryError);
protected:
bool raise_exception;
public:
///
/// The Mmgr() function builds a memory manager composed of bridge
/// functions connecting itself with it.
///
Mmgr ()
Mmgr (bool raise_exception = true): raise_exception (raise_exception)
{
this->alloc = alloc_mem;
this->realloc = realloc_mem;
@ -67,6 +77,38 @@ public:
///
virtual ~Mmgr () {}
///
/// The allocate() function calls allocMem() for memory
/// allocation. if it fails, it raise an exception if it's
/// configured to do so.
///
void* allocate (qse_size_t n)
{
void* xptr = this->allocMem (n);
if (!xptr && this->raise_exception) QSE_THROW (MemoryError);
return xptr;
}
///
/// The reallocate() function calls reallocMem() for memory
/// reallocation. if it fails, it raise an exception if it's
/// configured to do so.
///
void* reallocate (void* ptr, qse_size_t n)
{
void* xptr = this->reallocMem (ptr, n);
if (!xptr && this->raise_exception) QSE_THROW (MemoryError);
return xptr;
}
///
/// The dispose() function calls freeMem() for memory disposal.
///
void dispose (void* ptr)
{
this->freeMem (ptr);
}
//protected:
///
/// The allocMem() function allocates a chunk of memory of the

View File

@ -141,7 +141,7 @@ if ENABLE_CXX
lib_LTLIBRARIES += libqsecmnxx.la
libqsecmnxx_la_SOURCES = \
Mmgr.cpp StdMmgr.cpp ExcMmgr.cpp HeapMmgr.cpp Mmged.cpp Mpool.cpp
Mmgr.cpp StdMmgr.cpp HeapMmgr.cpp Mmged.cpp Mpool.cpp
libqsecmnxx_la_LDFLAGS = -version-info 1:0:0 -no-undefined
libqsecmnxx_la_LIBADD =

View File

@ -149,10 +149,10 @@ libqsecmn_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libqsecmn_la_LDFLAGS) $(LDFLAGS) -o $@
libqsecmnxx_la_DEPENDENCIES =
am__libqsecmnxx_la_SOURCES_DIST = Mmgr.cpp StdMmgr.cpp ExcMmgr.cpp \
HeapMmgr.cpp Mmged.cpp Mpool.cpp
am__libqsecmnxx_la_SOURCES_DIST = Mmgr.cpp StdMmgr.cpp HeapMmgr.cpp \
Mmged.cpp Mpool.cpp
@ENABLE_CXX_TRUE@am_libqsecmnxx_la_OBJECTS = Mmgr.lo StdMmgr.lo \
@ENABLE_CXX_TRUE@ ExcMmgr.lo HeapMmgr.lo Mmged.lo Mpool.lo
@ENABLE_CXX_TRUE@ HeapMmgr.lo Mmged.lo Mpool.lo
libqsecmnxx_la_OBJECTS = $(am_libqsecmnxx_la_OBJECTS)
libqsecmnxx_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
@ -435,7 +435,7 @@ libqsecmn_la_SOURCES = alg-base64.c alg-rand.c alg-search.c alg-sort.c \
libqsecmn_la_LDFLAGS = -version-info 1:0:0 -no-undefined
libqsecmn_la_LIBADD = $(SOCKET_LIBS) $(QUADMATH_LIBS)
@ENABLE_CXX_TRUE@libqsecmnxx_la_SOURCES = \
@ENABLE_CXX_TRUE@ Mmgr.cpp StdMmgr.cpp ExcMmgr.cpp HeapMmgr.cpp Mmged.cpp Mpool.cpp
@ENABLE_CXX_TRUE@ Mmgr.cpp StdMmgr.cpp HeapMmgr.cpp Mmged.cpp Mpool.cpp
@ENABLE_CXX_TRUE@libqsecmnxx_la_LDFLAGS = -version-info 1:0:0 -no-undefined
@ENABLE_CXX_TRUE@libqsecmnxx_la_LIBADD =
@ -516,7 +516,6 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ExcMmgr.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HeapMmgr.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Mmged.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Mmgr.Plo@am__quote@

View File

@ -25,7 +25,6 @@
*/
#include <qse/cmn/Mmgr.hpp>
#include <qse/cmn/ExcMmgr.hpp>
#include <qse/cmn/StdMmgr.hpp>
/////////////////////////////////
@ -47,7 +46,7 @@ void Mmgr::free_mem (mmgr_t* mmgr, void* ptr)
((Mmgr*)mmgr->ctx)->freeMem (ptr);
}
Mmgr* Mmgr::dfl_mmgr = ExcMmgr::getInstance();
Mmgr* Mmgr::dfl_mmgr = StdMmgr::getInstance();
Mmgr* Mmgr::getDFL ()
{
@ -65,22 +64,22 @@ QSE_END_NAMESPACE(QSE)
void* operator new (qse_size_t size, QSE::Mmgr* mmgr)
{
return mmgr->allocMem (size);
return mmgr->allocate (size);
}
void operator delete (void* ptr, QSE::Mmgr* mmgr)
{
mmgr->freeMem (ptr);
mmgr->dispose (ptr);
}
#if 0
void* operator new[] (qse_size_t size, QSE::Mmgr* mmgr)
{
return mmgr->allocMem (size);
return mmgr->allocate (size);
}
void operator delete[] (void* ptr, QSE::Mmgr* mmgr)
{
mmgr->freeMem (ptr);
mmgr->dispose (ptr);
}
#endif

View File

@ -87,7 +87,7 @@ void Mpool::dispose ()
Block* next = block->next;
//::delete[] (qse_uint8_t*)block;
this->mmgr->freeMem ((qse_uint8_t*)block);
this->mmgr->dispose ((qse_uint8_t*)block);
block = next;
}
@ -107,7 +107,7 @@ Mpool::Block* Mpool::add_block ()
//Block* block = (Block*)::new qse_uint8_t[
// QSE_SIZEOF(Block) + this->block_size * this->datum_size];
Block* block = (Block*)this->mmgr->allocMem (QSE_SIZEOF(Block) + this->block_size * this->datum_size);
Block* block = (Block*)this->mmgr->allocate (QSE_SIZEOF(Block) + this->block_size * this->datum_size);
if (!block) return QSE_NULL; // this line may not be reached if the allocator raises an exception
//this->free_list = (Chain*)block->data;