diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2019-11-04 10:47:45 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2019-11-04 10:47:45 +0300 |
commit | 803f7ed4bb05d8f79114e0e5f148e70c0a9dd3c7 (patch) | |
tree | c19371c667a4eac66f6d8359a16829eed789c478 /doc | |
parent | c85518128830826f5329d8ea470bd564db578f56 (diff) | |
download | bdwgc-803f7ed4bb05d8f79114e0e5f148e70c0a9dd3c7.tar.gz |
Move GC_throw_bad_alloc definition to new C++ file
Issue #268 (bdgwc).
* CMakeLists.txt [enable_cplusplus] (gccpp): Add gc_badalc.cc library
source file.
* Makefile.am [CPLUSPLUS] (libgccpp_la_SOURCES): Likewise.
* Makefile.am (EXTRA_DIST): Add gc_badalc.cpp.
* Makefile.direct (SRCS): Add gc_badalc.cc.
* Makefile.direct (gc_badalc.o): New target.
* NT_MAKEFILE (gc_badalc.obj): Likewise.
* WCC_MAKEFILE (gc_badalc.obj): Likewise.
* digimars.mak (gc_badalc.obj): Likewise.
* build/s60v3/libgc.mmp (SOURCE): Mention gc_badalc.cpp (commented out).
* Makefile.direct (c++): Add dependency on gc_badalc.o; pass gc_badalc.o
to ru tool.
* NT_MAKEFILE (gccpp.lib): Add dependency on gc_badalc.obj; pass
gc_badalc.obj to lib or link tool.
* WCC_MAKEFILE (gccpp.lib, gccpp.dll): Likewise.
* digimars.mak (OBJS): Add gc_badalc.obj.
* doc/README.Mac (Files to build the GC libraries): Add gc_badalc.cc.
* doc/gcinterface.md (C++ Interface): Mention gc_badalc.cc file.
* gc_badalc.cc: New file.
* gc_badalc.cpp: Likewise.
* gc_cpp.cc (GC_throw_bad_alloc): Move to gc_badalc.cc.
* gc_cpp.cc (GC_ALLOCATOR_THROW_OR_ABORT): Add comment; do not define
unless GC_NO_INLINE_STD_NEW, or not _MSC_VER and not __DMC__.
* tests/tests.am [CPLUSPLUS && AVOID_CPP_LIB] (test_cpp_LDADD): Add
gc_badalc.o.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/README.Mac | 1 | ||||
-rw-r--r-- | doc/gcinterface.md | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/doc/README.Mac b/doc/README.Mac index b317a2a5..018218ee 100644 --- a/doc/README.Mac +++ b/doc/README.Mac @@ -214,6 +214,7 @@ Files to build the GC libraries: ptr_chck.c reclaim.c typd_mlc.c + gc_badalc.cc gc_cpp.cc == 2. Test that the library works with 'test.c' == diff --git a/doc/gcinterface.md b/doc/gcinterface.md index fc91d38f..cf648cc4 100644 --- a/doc/gcinterface.md +++ b/doc/gcinterface.md @@ -133,11 +133,11 @@ The C++ interface is implemented as a thin layer on the C interface. Unfortunately, this thin layer appears to be very sensitive to variations in C++ implementations, particularly since it tries to replace the global `::new` operator, something that appears to not be well-standardized. Your -platform may need minor adjustments in this layer (`gc_cpp.cc`, `gc_cpp.h`, -and possibly `gc_allocator.h`). Such changes do not require understanding -of collector internals, though they may require a good understanding of your -platform. (Patches enhancing portability are welcome. But it is easy to break -one platform by fixing another.) +platform may need minor adjustments in this layer (`gc_badalc.cc`, +`gc_cpp.cc`, `gc_cpp.h`, and possibly `gc_allocator.h`). Such changes do not +require understanding of collector internals, though they may require a good +understanding of your platform. (Patches enhancing portability are welcome. +But it is easy to break one platform by fixing another.) Usage of the collector from C++ is also complicated by the fact that there are many _standard_ ways to allocate memory in C++. The default `::new` operator, |