
TODO:
modification of manual page efence.3
create manual describing compilation and installation
implement a list structure over pages rather than an array for all slots.
  this would save copying all slot entries.
implement EF_MALLOC_FAILEXIT which exits when allocation fails
make new variants behave fully C++ conform
store __func__ additionally to __FILE__ and __LINE__
-config for
 long int sysconf (int parameter)  	Function
  This function is used to inquire about runtime system parameters. The parameter argument should be one of the _SC_ symbols listed below.
  The normal return value from sysconf is the value you requested. A value of -1 is returned both if the implementation does not impose a limit, and in case of an error.
  The following errno error conditions are defined for this function:
  EINVAL           The value of the parameter is invalid.
  enums:
    _SC_PAGESIZE     Inquire about the virtual memory page size of the machine. getpagesize returns the same value (see Query Memory Parameters).
    _SC_PHYS_PAGES   Inquire about the number of physical pages in the system.
    _SC_AVPHYS_PAGES Inquire about the number of available physical pages in the system.
new macro: EF_CHECK_NON_VM_PROTECTABLE()
new macros: NEW_PROTECT_BELOW, NEW_PROTECT_ABOVE
new macros: MALLOC_PROTECT_BELOW(), MALLOC_PROTECT_ABOVE()


CHANGES:

2.4.13 added internal flag saving the source (allocation/deallocation)
         for filename and lineno.
       added EF_OLD_NEW_MACRO preprocessor flag to keep compatibility to old
         NEW_ELEM() / NEW_ARRAY() macros. when not defined a macro for "new"
         is defined which has standard conform syntax. unfortunately you have
         to use DEL_ELEM/DEL_ARRAY further to utilize filename and linenumber
         of deallocation calls.
       (2005-02-10, HA)
       reworked/revised ALL internal functions !!!
       freeing already freed memory is now detected (much better)
         this disallows coalescing memory regions and also stores __FILE__
         and __LINE__ of free() to be able to print position of first free.
       added EF_USE_FRAMENO preprocessor flag. changed not to support
         EF_newFrame() and EF_delFrame() by default.
       (2005-02-07, HA)
       applied bugfix posted by Luis Gonzalez. bug was occuring under
         SuSE Linux 9.1 when calling eftest with a higher number f.e. 10000.
       (2005-02-02, HA)
       bugfixed memalign() which was not exported as extern "C". this bug lead
         to crashes when freeing memory allocated by memalign(). bug was
         reported by Grant Goodyear and Steven G. Johnson.
       now defining macros/functions also for valloc()
       (2005-02-03, HA)

2.4.12 added EF_NO_GLOBAL_MALLOC_FREE preprocessor flag to workaround buggy environments:
       no malloc(),free(),realloc(),calloc() are put into the global namespace
       of the efence library, thus only files which include efence.h call the
       efence malloc(),.. replacement functions.
       this flag is also helpful where linking order cannot get controlled
       f.e. when memory is allocated from a library not using efence but free
       is called from efence using efence. this is a problem when using .dll
       libraries which are linked against msvcrt.dll and its malloc/free under
       MS Windows. the same problem applies when libstdc++ / libgcc is not
       linked in correct order.
       (2005-01-04, HA)

2.4.11 bugfixed signal handling in confidence test (eftest),
         which lead to false errors with my newly installed MandrakeLinux 10.1 distribution
       (2005-01-03, HA)

       bugfixed checking at free(), when EF_PROTECT_BELOW flag changed:
         which lead to false positives.
       bugfixed error message output to stderr: length of messages were calculated too short
         fixed functions EF_Abort() and EF_Exit()
       (2004-08-15, HA)

2.4.10 added preprocessor macros for CA_DECLARE, CA_DEFINE, CA_REF in efence.h
         for declaration, definition and reference to Checked Arrays.
         these macros allow checks of arrays which are allocated on stack, but they are
         very slow on references every reference has to be checked.
       added EF_ASSERT() which definitely halts (for debugging)
       precompiled headers have to be switched off in MS Visual C++ to get all the C++
	     operators to work. but don't ask me why!
       added all the various new/delete/new[]/delete[] C++ operator implementations.
         the implementations are not C++ conform concerning their behaviour
       added type mismatch detection between malloc()/free(), new/delete, new[]/delete[]
         this is deactivated when EF_NO_LEAKDETECTION set.
       added EF_MALLOC_FAILEXIT parameter. (for now not implemented)
       extended semantics of EF_PROTECT_FREE.
       added EF_MAX_ALLOC parameter.
       bugfix: why should we ever use Page_Delete() when setting up the "dead" page?
       bugfix: EF_PROTECT_FREE did exactly the opposite of that, what it should do
        up from Bruce's version 2.2.2 maybe earlier.
       (2004-07-16, HA)

       confidence test now PASSes again
       removed problems when used EF_NO_LEAKDETECTION preprocessor flag
       got Makefile to work again, also included automatic generation of efence_config.h
       added automatic generation and inclusion of efence_config.h instead function Page_Size()
       (2004-07-15, HA)

       added code for thread safety: only one thread at once is allowed to enter
       some internal functions. this can be deactivated using the EF_NO_THREAD_SAFETY
	   preprocessor flag. there may be flaws concering threads, when using the c++ operators
	   for leak detection: use the EF_NO_LEAKDETECTION preprocessor flag if you encounter problems!
	   some files (page.c and print.c) have turned to header files,
	   the needed functions are now declared static
	   and are no more visible outside efence.c this way
	   the NDEBUG preprocessor flag has been replaced by EF_NO_EFENCE, EF_NO_CPP_SUPPORT.
	   so be careful not to include efence in your release builds!
	   (2004-03-21, HA)

2.4.9  added checks for no mans land (= space which cannot get protected from the MMU):
       this area get filled with EF_FILL on allocation, and gets checked on deallocation.
       (2002-12-04, HA)

2.4.8  one big fix and many improvements for C++ code. old macros NEW_ELEM, NEW_ARRAY were not
       usable when allocating classes, which have constructor/destructor. the usage of these
       macros has not changed (see 2.4.3).
       (2002-12-04, HA)

2.4.7  get to work with Borland Free Commandline Tools (Borland C++ Builder 5.5)
       thrown away unnecessary declarations of malloc(), free(), .. Borland didn't like them,
         and neither MS-Visual C++ 6.0 nor gcc (Dev-C++) needs them.
       added project files in subdir "win32-vide" for VIDE 1.24 using Borland C++
       Builder 5.5 (see http://www.objectcentral.com)
       (2002-11-22, HA)

2.4.6  remove memory leak in eftest
       allowed re-inclusion of efence.h after inclusion of efenceint.h
       added some project files in subdir "win32-devcpp" for Dev-C++ 4.9.6 using gcc
         (see http://www.bloodshed.net) and saved its generated makefiles
       left tstheap's memory leaks
       (2002-11-17, HA)

2.4.5  modifications in print routines (EF_Print, EF_Abort, ..)
       added direct output to visual c++ debug output window.
	   some additions to Makefile
       (2002-11-17, HA)

2.4.4  several modifications
         seperation of c++ files: efencepp.h, efencepp.cpp
         renamed EF_push()/EF_pop() to EF_newFrame()/EF_delFrame()
         new compile option "EF_NO_LEAKDETECTION"
         new compile option "EF_NO_CPP"
         splitted efence.h to efence.h and efenceint.h
         added Copyright and License information to many files
         renamed COPYING to COPYING-GPL
       (2002-11-03, HA)

2.4.3  added following PreProcessor Macros for Release and Debug Mode
         #define NEW_ELEM(TYPE)          new TYPE
         #define NEW_ARRAY(TYPE,COUNT)   new (TYPE)[COUNT]
         #define DEL_ELEM(PTR)           delete PTR
         #define DEL_ARRAY(PTR)          delete []PTR
       which are mapped to malloc() and free() in Debug Mode.
       Use these macros to get filename and linenumber of a C++ style memory leak.
       (2002-10-07, HA)

2.4.2  added support for implicit and explicit leak checking:
         void EF_push(void)  creates a new memory frame.
         void EF_pop(void)   checks for memory leaks allocated after EF_push().
                            this function is called automatically onexit(), even without EF_push().
       (2002-10-07, HA)

2.4.1  Port to Windows (NT/2000/XP) by adding sections to following functions
       Page_AllowAccess(), Page_Create(), Page_Delete(), Page_DenyAccess(), Page_Size()
       (2002-10-06, HA)

2.4.0  added support for C++ operators new, new[], delete and delete[].
       added some project files in subdir "win32-msvc" for MS-Visual C++ 6.0
       (2002-10-03, HA)



2.2.2	Oops. Shared library must be position-independent code.

2.2.0
	Merge in bug-fixes, multi-thread patch, shared library patch,
	debian/ subdirectory used for building the Debian package

2.0.1
	Add work-arounds for kernel and library bugs under HP-UX.
	HP has been notified and will repair these soon.

2.0.2
	Add support for DEC Alpha. Add %a pattern for printing addresses, which
	assumes they are passed in a void *.

2.0.3 30-Sep-1993
	When realloc is passed a zero address, it should work the same
	way as malloc(). Fix forward declaration of mprotect() in page.c to
	use void *, not caddr_t, for addresses. IRIX 5.0.1 complained about that.

2.0.4 29-May-1994
	Don't attempt to allow access to a zero-sized page when
	EF_ALLOW_MALLOC_0 is set. Attempt to un-map memory from
	Page_Delete(). If that doesn't work, fall back by protecting the
	page from all references. Un-mapping small segments of a mapping
	used to crash my SGI IRIX 5.0 system. I assume that nobody is running
	5.0 any longer.

2.0.5 20-January-1995
	Port to Linux.
