* harbour/source/vm/dlmalloc.c
! fixed casting
* harbour/source/vm/fm.c
% use DLMALLOC as default memory manager in OpenWatcom Windows builds.
Warning: HB_FM_DLMT_ALLOC does not work with OpenWatcom.
* harbour/config/dos/owatcom.cf
* harbour/config/win/owatcom.cf
* harbour/config/linux/owatcom.cf
* harbour/config/os2/owatcom.cf
* changed alignment settings from 8 to 4
* synced optimization flags used in different builds
! fixed linker parameters when HB_BUILD_DEBUG=yes is set
; TOVERIFY: I do not remember what calling convention should be used
in OpenWatcom MT OS2 builds to eliminate GPF when APIENTRY16 functions
are called. It's possible that current settings are wrong.
* harbour/config/win/owatcom.cf
* removed STACK=65536 from OpenWatcom linker parameters.
This switch probably was inherited from old DOS WatcomC builds.
Later I'll test current OpwnWatcom builds to check if we can also
remove it from DOS builds when cwstub.exe is used.
* restored -bm switch. When DLMALLOC is used it does not cause
noticeable performance reduction.
* use default register calling convention. We can change it
in the future but 1-st we should check the performance overhead.
If calling convention is a problem only for .DLLs then it can
be resolved by modifying HB_EXTERN declaration and adding function
attributes which will force given calling convention.
* harbour/config/linux/owatcom.cf
* enabled pentium pro instruction in OpenWatcom Linux builds.
It reduces the code size and increase performance a little bit.
Windows users which do not need pure pentium CPU support can make
the same.
* harbour/utils/hbmk2/hbmk2.prg
! fixed object extension used in OpenWatcom Linux builds: it's .o not .obj
! fixed linker parameters in OpenWatcom Linux builds: DEBUG ALL is single
option
! fixed OpenWatcom calling convention settings. Viktor you cannot chose
simultaneously register and stack calling convention. You have to chose
one and keep it synced with Harbour compile time settings. Otherwise
you will have unresolved external or you will force creating by linker
dynamically function call wrappers (of course if OW support such
functionality) what may strongly reduce the performance.
! removed -j compile time switch - it's not used to compile core code
* synced optimization flags with core code
I'm really interested in current OpenWatcom speedtst results compared
with other Windows builds (MSVC, MinGW, BCC, POCC) in ST and MT builds.
* harbour/include/hbapi.h
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* harbour/source/vm/fm.c
+ added support for thread local memory allocators by using MSPACE
mechanism in DLALLOC.
It can be enabled by compiling Harbour with HB_FM_DLMT_ALLOC macro.
By default up to 16 (HB_MSPACE_COUNT macro) independent memory
allocators is dynamically created for new threads. When more threads
is used then allocators are shared between them and HVM tries to
balance used allocators to reduce number of threads using the
same allocator.
It should give noticeable scalability improvement in some OS-es
where default memory manages has pure MT performance.
Please try to compiler speedtst.prg with Harbour compiled with
and without HB_FM_DLMT_ALLOC and compare results in this test:
speedtst --thread=2 --scale
using real multiCPU machine.
* harbour/source/vm/dlmalloc.c
* pacified warning when FOOTERS are enabled
* harbour/source/vm/garbage.c
* cleanup comment
* harbour/include/hbapi.h
* harbour/source/common/hbstr.c
+ added hb_numToStr()
* harbour/source/vm/estack.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* use hb_numToStr() for integer number conversions
* harbour/source/vm/dlmalloc.c
* disable #pragma warning ... in MinGW builds. If some newer MinGW
versions support it and it's useful then it can be enabled after
checking MinGW version
* source/common/hbfopen.c
* Changed hb_fopen() to use fopen_s(), secure version of
fopen() for MSVS 2005 and upper.
* source/common/hbstr.c
+ Added hb_snprintf() Harbour wrapper for snprintf() which
terminates the buffer with a '\0' char for CRTLs that
need this (like MSVC).
MSVC _snprintf() doesn't do so.
* hb_snprintf() used _snprintf_s(), secure version of
_snprintf() for MSVS 2005 and upper.
; TOFIX: There is still one strcpy() marked as non-secure
in debug lib. Could someone please take a look
at it and replace it with hb_strncpy() or something
else secure? The code is cryptic and as someone
not using the debugger, I didn't dare to touch it,
and this is the only one such call left.
; TODO: Change all snprintf() calls to hb_snprintf().
When that happens, Harbour will no more use anything
depicted as "non-secure" by MSVS 2005/2008.
; NOTE: This function may need tweaking, pls review and
fix if/where needed.
* source/vm/dlmalloc.c
! Fixed MSVC C++ mode compile error. This fix also exists
as part of the next dlmalloc version (2.8.4b).
2008-10-26 07:27 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbdbgfx/dbgfx.prg
* Minor cleanup.
* contrib/hbdbgfx/dbgfxc.c
! Fixed GPF when non-string parameter passed to
hb_outdebug().
* harbour/source/vm/fm.c
+ harbour/source/vm/dlmalloc.c
+ added alternative memory manager written by Doug Lea
It can be activated by recompiling Harbour with HB_FM_DL_ALLOC macro.
Please make test on different platforms with different C compilers.
Linux users will not benefit from it because the default GLIBC MM
is derived from a version of code.
NOTE: the results may strongly depend on total memory allocation
and will be different then in simple memory tests.