Commit Graph

9 Commits

Author SHA1 Message Date
Viktor Szakats
1e91d9af72 2009-07-29 17:46 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* source/vm/dlmalloc.c
    ! Restored 2.8.3.
      Huge amount of warnings (all Windows compilers), compile time (pocc, watcom)
      and build time (mingw) errors, incompatibility with fm.c parts, with 2.8.4,
      so I opted to revert.
      I hope someone will give it another go, as it should provide better MT
      performance on Windows, unfortunately this feature doesn't seem to be well 
      tested at this point.

  * config/lib.cf
    ! Fix dir creation for hbpp executable with os2 shells.
2009-07-29 15:47:59 +00:00
Viktor Szakats
955f02d619 2009-07-29 09:37 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* source/vm/dlmalloc.c
    + Updated to 2.8.4 (from 2.8.3)
      Reapplied two local patches (the rest of local fixes were applied upstream):
         2009-07-28 16:31 UTC+0200 Przemyslaw Czerpak
         2009-03-30 22:17 UTC+0200 Przemyslaw Czerpak
    ; From the dlmalloc changelog:
      V2.8.4 Wed May 27 09:56:23 2009  Doug Lea  (dl at gee)
        * Use zeros instead of prev foot for is_mmapped
        * Add mspace_track_large_chunks; thanks to Jean Brouwers
        * Fix set_inuse in internal_realloc; thanks to Jean Brouwers
        * Fix insufficient sys_alloc padding when using 16byte alignment
        * Fix bad error check in mspace_footprint
        * Adaptations for ptmalloc; thanks to Wolfram Gloger.
        * Reentrant spin locks; thanks to Earl Chew and others
        * Win32 improvements; thanks to Niall Douglas and Earl Chew
        * Add NO_SEGMENT_TRAVERSAL and MAX_RELEASE_CHECK_RATE options
        * Extension hook in malloc_state
        * Various small adjustments to reduce warnings on some compilers
        * Various configuration extensions/changes for more platforms. Thanks
           to all who contributed these.
2009-07-29 07:38:32 +00:00
Przemyslaw Czerpak
d53ec11751 2009-07-28 16:31 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/dlmalloc.c
    * modified to compile in OS2 (tested only compilation with OpenWatcom,
      without real binaries tests)
2009-07-28 14:31:17 +00:00
Przemyslaw Czerpak
5feb21d8c8 2009-03-30 22:17 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* 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.
2009-03-30 20:10:32 +00:00
Przemyslaw Czerpak
7f1dcb2a81 2009-03-29 19:20 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* 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
2009-03-29 17:13:52 +00:00
Przemyslaw Czerpak
caf47b7238 2008-11-10 14:41 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* 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
2008-11-10 13:40:43 +00:00
Viktor Szakats
3876864996 2008-10-31 02:14 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* source/vm/dlmalloc.c
    ! Fixed minor MinGW warning. This fix also exists 
      as part of the next dlmalloc version (2.8.4b).
2008-10-31 01:14:51 +00:00
Viktor Szakats
79708d30b0 2008-10-26 22:25 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* 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().
2008-10-26 21:43:34 +00:00
Przemyslaw Czerpak
5ec4b754b9 2008-09-18 01:17 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* 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.
2008-09-17 23:17:45 +00:00