By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 860
Collapse All | Expand All

(-)libraries/libtqt-perl/PerlTQt/TQt.pm (-1 / +1 lines)
Lines 884-890 Link Here
884
# try to avoid KDE's buggy malloc
884
# try to avoid KDE's buggy malloc
885
# only works for --enable-fast-malloc,
885
# only works for --enable-fast-malloc,
886
# not when --enable-fast-malloc=full
886
# not when --enable-fast-malloc=full
887
$ENV{'KDE_MALLOC'} = 0;
887
$ENV{'TDE_MALLOC'} = 0;
888
888
889
TQt::_internal::init();
889
TQt::_internal::init();
890
890
(-)tdelibs/CMakeLists.txt (-6 / +6 lines)
Lines 61-69 Link Here
61
61
62
OPTION( WITH_ALL_OPTIONS "Enable all optional support" OFF )
62
OPTION( WITH_ALL_OPTIONS "Enable all optional support" OFF )
63
63
64
OPTION( KDE_MALLOC "Use own malloc implementation" OFF )
64
OPTION( TDE_MALLOC "Use own malloc implementation" OFF )
65
OPTION( KDE_MALLOC_DEBUG "Enable debugging in fast malloc" OFF )
65
OPTION( TDE_MALLOC_DEBUG "Enable debugging in fast malloc" OFF )
66
OPTION( KDE_MALLOC_FULL "Make alloc as fast as possible" OFF )
66
OPTION( TDE_MALLOC_FULL "Make alloc as fast as possible" OFF )
67
67
68
OPTION( WITH_ARTS "Build with aRts" ON )
68
OPTION( WITH_ARTS "Build with aRts" ON )
69
OPTION( WITH_ALSA "Enable ALSA support" ON )
69
OPTION( WITH_ALSA "Enable ALSA support" ON )
Lines 96-107 Link Here
96
96
97
### FIXME fast malloc is also available on x86_64 architecture?
97
### FIXME fast malloc is also available on x86_64 architecture?
98
if( ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i?86" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" )
98
if( ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i?86" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" )
99
  set( KDE_MALLOC_X86 1 )
99
  set( TDE_MALLOC_X86 1 )
100
  message( STATUS "Found x86 architecture" )
100
  message( STATUS "Found x86 architecture" )
101
else( ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i?86" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" )
101
else( ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i?86" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" )
102
  if( KDE_MALLOC )
102
  if( TDE_MALLOC )
103
    message( FATAL_ERROR "\nKDE fast malloc is available only on x86 architecture" )
103
    message( FATAL_ERROR "\nKDE fast malloc is available only on x86 architecture" )
104
  endif( KDE_MALLOC )
104
  endif( TDE_MALLOC )
105
endif( ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i?86" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" )
105
endif( ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i?86" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" )
106
106
107
107
(-)tdelibs/config.h.cmake (-5 / +5 lines)
Lines 720-738 Link Here
720
#define KDE_DISTRIBUTION_TEXT "@KDE_DISTRIBUTION_TEXT@"
720
#define KDE_DISTRIBUTION_TEXT "@KDE_DISTRIBUTION_TEXT@"
721
721
722
/* Use own malloc implementation */
722
/* Use own malloc implementation */
723
#cmakedefine KDE_MALLOC 1
723
#cmakedefine TDE_MALLOC 1
724
724
725
/* Enable debugging in fast malloc */
725
/* Enable debugging in fast malloc */
726
#cmakedefine KDE_MALLOC_DEBUG 1
726
#cmakedefine TDE_MALLOC_DEBUG 1
727
727
728
/* Make alloc as fast as possible */
728
/* Make alloc as fast as possible */
729
#cmakedefine KDE_MALLOC_FULL 1
729
#cmakedefine TDE_MALLOC_FULL 1
730
730
731
/* The libc used is glibc */
731
/* The libc used is glibc */
732
#undef KDE_MALLOC_GLIBC
732
#undef TDE_MALLOC_GLIBC
733
733
734
/* The platform is x86 */
734
/* The platform is x86 */
735
#cmakedefine KDE_MALLOC_X86 1
735
#cmakedefine TDE_MALLOC_X86 1
736
736
737
/* Define if we shall use KSSL */
737
/* Define if we shall use KSSL */
738
#cmakedefine KSSL_HAVE_SSL 1
738
#cmakedefine KSSL_HAVE_SSL 1
(-)tdelibs/tdecore/malloc/README (-4 / +4 lines)
Lines 7-13 Link Here
7
 There's a new configure switch, --enable-fast-malloc. By default it's turned off, disabling
7
 There's a new configure switch, --enable-fast-malloc. By default it's turned off, disabling
8
the system libc one and using this one. Using --enable-fast-malloc=full enables this
8
the system libc one and using this one. Using --enable-fast-malloc=full enables this
9
malloc unconditionally, aiming for the maximum performance. By using only --enable-fast-malloc,
9
malloc unconditionally, aiming for the maximum performance. By using only --enable-fast-malloc,
10
it's possible to select both malloc implementations at runtime. When $KDE_MALLOC is set to 0,
10
it's possible to select both malloc implementations at runtime. When $TDE_MALLOC is set to 0,
11
the system libc malloc is used, otherwise this malloc is used.
11
the system libc malloc is used, otherwise this malloc is used.
12
12
13
 For now, the requirements are :
13
 For now, the requirements are :
Lines 31-41 Link Here
31
#define USE_MEMCPY 0
31
#define USE_MEMCPY 0
32
#define MMAP_CLEARS 1
32
#define MMAP_CLEARS 1
33
made all functions INLINE
33
made all functions INLINE
34
added #ifdef KDE_MALLOC_DEBUG -> #define DEBUG
34
added #ifdef TDE_MALLOC_DEBUG -> #define DEBUG
35
reordered all functions in order to avoid 'warning: `XYZ' declared inline after being called'
35
reordered all functions in order to avoid 'warning: `XYZ' declared inline after being called'
36
    especially moved the public_* ones at the end of the file
36
    especially moved the public_* ones at the end of the file
37
commented out #including malloc.h
37
commented out #including malloc.h
38
added #include <config.h> at the top and enclosed whole file in #ifdef KDE_MALLOC
38
added #include <config.h> at the top and enclosed whole file in #ifdef TDE_MALLOC
39
taken posix_memalign() from glibc
39
taken posix_memalign() from glibc
40
removed public icalloc(),icomalloc(),mtrim(),musable()  (they don't exist everywhere anyway)
40
removed public icalloc(),icomalloc(),mtrim(),musable()  (they don't exist everywhere anyway)
41
enclosed the pthreads part by #if 0 and replaced it with spinlock from glibc CVS (in x86.h)
41
enclosed the pthreads part by #if 0 and replaced it with spinlock from glibc CVS (in x86.h)
Lines 45-51 Link Here
45
#define MALLOC_PREACTION   lock( &spinlock )
45
#define MALLOC_PREACTION   lock( &spinlock )
46
#define MALLOC_POSTACTION  unlock( &spinlock )
46
#define MALLOC_POSTACTION  unlock( &spinlock )
47
----------
47
----------
48
public functions call either functions in this malloc or in libc, depending on $KDE_MALLOC
48
public functions call either functions in this malloc or in libc, depending on $TDE_MALLOC
49
the kde_malloc_is_used hack
49
the kde_malloc_is_used hack
50
50
51
51
(-)tdelibs/tdecore/malloc/configure.in.in (-7 / +7 lines)
Lines 1-4 Link Here
1
dnl --enable-fast-malloc      - depends on $KDE_MALLOC
1
dnl --enable-fast-malloc      - depends on $TDE_MALLOC
2
dnl --disable-fast-malloc     - disabled
2
dnl --disable-fast-malloc     - disabled
3
dnl --enable-fast-malloc=full - enabled always
3
dnl --enable-fast-malloc=full - enabled always
4
dnl
4
dnl
Lines 38-44 Link Here
38
dnl platforms for which there's a spinlock implementation
38
dnl platforms for which there's a spinlock implementation
39
    case $target_cpu in
39
    case $target_cpu in
40
        i?86)
40
        i?86)
41
            AC_DEFINE(KDE_MALLOC_X86, 1, [The platform is x86])
41
            AC_DEFINE(TDE_MALLOC_X86, 1, [The platform is x86])
42
            ;;
42
            ;;
43
        *)
43
        *)
44
            if test "$kde_fast_malloc" = "notgiven"; then
44
            if test "$kde_fast_malloc" = "notgiven"; then
Lines 63-69 Link Here
63
fi
63
fi
64
64
65
if test "$kde_fast_malloc" = "yes" -o "$kde_fast_malloc" = "notgiven" -o "$kde_fast_malloc" = "debug"; then
65
if test "$kde_fast_malloc" = "yes" -o "$kde_fast_malloc" = "notgiven" -o "$kde_fast_malloc" = "debug"; then
66
dnl $KDE_MALLOC needs glibc (__libc_malloc etc.)
66
dnl $TDE_MALLOC needs glibc (__libc_malloc etc.)
67
    AC_CACHE_CHECK([if the libc is glibc],kde_cv_libc_glibc,
67
    AC_CACHE_CHECK([if the libc is glibc],kde_cv_libc_glibc,
68
        [AC_TRY_COMPILE(
68
        [AC_TRY_COMPILE(
69
            [#include<stdlib.h>],
69
            [#include<stdlib.h>],
Lines 76-82 Link Here
76
            [kde_cv_libc_glibc=no])
76
            [kde_cv_libc_glibc=no])
77
        ])
77
        ])
78
    if test "$kde_cv_libc_glibc" = "yes"; then
78
    if test "$kde_cv_libc_glibc" = "yes"; then
79
        AC_DEFINE(KDE_MALLOC_GLIBC, 1, [The libc used is glibc])
79
        AC_DEFINE(TDE_MALLOC_GLIBC, 1, [The libc used is glibc])
80
    else
80
    else
81
        if test "$kde_fast_malloc" = "notgiven"; then
81
        if test "$kde_fast_malloc" = "notgiven"; then
82
            kde_fast_malloc=notgiven_full
82
            kde_fast_malloc=notgiven_full
Lines 116-130 Link Here
116
fi
116
fi
117
117
118
if test "$kde_fast_malloc" != "no"; then
118
if test "$kde_fast_malloc" != "no"; then
119
    AC_DEFINE(KDE_MALLOC, 1, [Use own malloc implementation])
119
    AC_DEFINE(TDE_MALLOC, 1, [Use own malloc implementation])
120
fi
120
fi
121
121
122
if test "$kde_fast_malloc" = "debug" -o "$kde_fast_malloc" = "debug_full"; then
122
if test "$kde_fast_malloc" = "debug" -o "$kde_fast_malloc" = "debug_full"; then
123
    AC_DEFINE(KDE_MALLOC_DEBUG, 1, [Enable debugging in fast malloc])
123
    AC_DEFINE(TDE_MALLOC_DEBUG, 1, [Enable debugging in fast malloc])
124
fi
124
fi
125
125
126
if test "$kde_fast_malloc" = "full" -o "$kde_fast_malloc" = "debug_full"; then
126
if test "$kde_fast_malloc" = "full" -o "$kde_fast_malloc" = "debug_full"; then
127
    AC_DEFINE(KDE_MALLOC_FULL, 1, [Make alloc as fast as possible])
127
    AC_DEFINE(TDE_MALLOC_FULL, 1, [Make alloc as fast as possible])
128
fi
128
fi
129
129
130
dnl -finline-limit=<large num> is needed for gcc3 in order to inline large functions
130
dnl -finline-limit=<large num> is needed for gcc3 in order to inline large functions
(-)tdelibs/tdecore/malloc/malloc.c (-26 / +26 lines)
Lines 7-15 Link Here
7
*/
7
*/
8
int kde_malloc_is_used = 0;
8
int kde_malloc_is_used = 0;
9
9
10
#ifdef KDE_MALLOC
10
#ifdef TDE_MALLOC
11
11
12
#ifdef KDE_MALLOC_DEBUG
12
#ifdef TDE_MALLOC_DEBUG
13
#define DEBUG
13
#define DEBUG
14
#endif
14
#endif
15
15
Lines 1559-1565 Link Here
1559
1559
1560
#else
1560
#else
1561
1561
1562
#ifdef KDE_MALLOC_X86
1562
#ifdef TDE_MALLOC_X86
1563
#include "x86.h"
1563
#include "x86.h"
1564
#else
1564
#else
1565
#error Unknown spinlock implementation
1565
#error Unknown spinlock implementation
Lines 5475-5483 Link Here
5475
5475
5476
#ifdef USE_PUBLIC_MALLOC_WRAPPERS
5476
#ifdef USE_PUBLIC_MALLOC_WRAPPERS
5477
5477
5478
#ifndef KDE_MALLOC_FULL
5478
#ifndef TDE_MALLOC_FULL
5479
5479
5480
#ifdef KDE_MALLOC_GLIBC
5480
#ifdef TDE_MALLOC_GLIBC
5481
#include "glibc.h"
5481
#include "glibc.h"
5482
#else
5482
#else
5483
/* cannot use dlsym(RTLD_NEXT,...) here, it calls malloc()*/
5483
/* cannot use dlsym(RTLD_NEXT,...) here, it calls malloc()*/
Lines 5491-5497 Link Here
5491
static int malloc_type = 0;
5491
static int malloc_type = 0;
5492
static void init_malloc_type(void)
5492
static void init_malloc_type(void)
5493
    {
5493
    {
5494
    const char* const env = getenv( "KDE_MALLOC" );
5494
    const char* const env = getenv( "TDE_MALLOC" );
5495
    if( env == NULL )
5495
    if( env == NULL )
5496
        malloc_type = 1;
5496
        malloc_type = 1;
5497
    else if( env[ 0 ] == '0' || env[ 0 ] == 'n' || env[ 0 ] == 'N' )
5497
    else if( env[ 0 ] == '0' || env[ 0 ] == 'n' || env[ 0 ] == 'N' )
Lines 5503-5509 Link Here
5503
#endif
5503
#endif
5504
5504
5505
Void_t* public_mALLOc(size_t bytes) {
5505
Void_t* public_mALLOc(size_t bytes) {
5506
#ifndef KDE_MALLOC_FULL
5506
#ifndef TDE_MALLOC_FULL
5507
  if( malloc_type == 1 )
5507
  if( malloc_type == 1 )
5508
    {
5508
    {
5509
#endif
5509
#endif
Lines 5515-5521 Link Here
5515
  if (MALLOC_POSTACTION != 0) {
5515
  if (MALLOC_POSTACTION != 0) {
5516
  }
5516
  }
5517
  return m;
5517
  return m;
5518
#ifndef KDE_MALLOC_FULL
5518
#ifndef TDE_MALLOC_FULL
5519
    }
5519
    }
5520
  if( malloc_type == 2 )
5520
  if( malloc_type == 2 )
5521
      return libc_malloc( bytes );
5521
      return libc_malloc( bytes );
Lines 5525-5531 Link Here
5525
}
5525
}
5526
5526
5527
void public_fREe(Void_t* m) {
5527
void public_fREe(Void_t* m) {
5528
#ifndef KDE_MALLOC_FULL
5528
#ifndef TDE_MALLOC_FULL
5529
  if( malloc_type == 1 )
5529
  if( malloc_type == 1 )
5530
    {
5530
    {
5531
#endif
5531
#endif
Lines 5535-5541 Link Here
5535
  fREe(m);
5535
  fREe(m);
5536
  if (MALLOC_POSTACTION != 0) {
5536
  if (MALLOC_POSTACTION != 0) {
5537
  }
5537
  }
5538
#ifndef KDE_MALLOC_FULL
5538
#ifndef TDE_MALLOC_FULL
5539
  return;
5539
  return;
5540
    }
5540
    }
5541
  if( malloc_type == 2 )
5541
  if( malloc_type == 2 )
Lines 5549-5555 Link Here
5549
}
5549
}
5550
5550
5551
Void_t* public_rEALLOc(Void_t* m, size_t bytes) {
5551
Void_t* public_rEALLOc(Void_t* m, size_t bytes) {
5552
#ifndef KDE_MALLOC_FULL
5552
#ifndef TDE_MALLOC_FULL
5553
  if( malloc_type == 1 )
5553
  if( malloc_type == 1 )
5554
    {
5554
    {
5555
#endif
5555
#endif
Lines 5560-5566 Link Here
5560
  if (MALLOC_POSTACTION != 0) {
5560
  if (MALLOC_POSTACTION != 0) {
5561
  }
5561
  }
5562
  return m;
5562
  return m;
5563
#ifndef KDE_MALLOC_FULL
5563
#ifndef TDE_MALLOC_FULL
5564
    }
5564
    }
5565
  if( malloc_type == 2 )
5565
  if( malloc_type == 2 )
5566
      return libc_realloc( m, bytes );
5566
      return libc_realloc( m, bytes );
Lines 5570-5576 Link Here
5570
}
5570
}
5571
5571
5572
Void_t* public_mEMALIGn(size_t alignment, size_t bytes) {
5572
Void_t* public_mEMALIGn(size_t alignment, size_t bytes) {
5573
#ifndef KDE_MALLOC_FULL
5573
#ifndef TDE_MALLOC_FULL
5574
  if( malloc_type == 1 )
5574
  if( malloc_type == 1 )
5575
    {
5575
    {
5576
#endif
5576
#endif
Lines 5582-5588 Link Here
5582
  if (MALLOC_POSTACTION != 0) {
5582
  if (MALLOC_POSTACTION != 0) {
5583
  }
5583
  }
5584
  return m;
5584
  return m;
5585
#ifndef KDE_MALLOC_FULL
5585
#ifndef TDE_MALLOC_FULL
5586
    }
5586
    }
5587
  if( malloc_type == 2 )
5587
  if( malloc_type == 2 )
5588
      return libc_memalign( alignment, bytes );
5588
      return libc_memalign( alignment, bytes );
Lines 5592-5598 Link Here
5592
}
5592
}
5593
5593
5594
Void_t* public_vALLOc(size_t bytes) {
5594
Void_t* public_vALLOc(size_t bytes) {
5595
#ifndef KDE_MALLOC_FULL
5595
#ifndef TDE_MALLOC_FULL
5596
  if( malloc_type == 1 )
5596
  if( malloc_type == 1 )
5597
    {
5597
    {
5598
#endif
5598
#endif
Lines 5604-5610 Link Here
5604
  if (MALLOC_POSTACTION != 0) {
5604
  if (MALLOC_POSTACTION != 0) {
5605
  }
5605
  }
5606
  return m;
5606
  return m;
5607
#ifndef KDE_MALLOC_FULL
5607
#ifndef TDE_MALLOC_FULL
5608
    }
5608
    }
5609
  if( malloc_type == 2 )
5609
  if( malloc_type == 2 )
5610
      return libc_valloc( bytes );
5610
      return libc_valloc( bytes );
Lines 5614-5620 Link Here
5614
}
5614
}
5615
5615
5616
Void_t* public_pVALLOc(size_t bytes) {
5616
Void_t* public_pVALLOc(size_t bytes) {
5617
#ifndef KDE_MALLOC_FULL
5617
#ifndef TDE_MALLOC_FULL
5618
  if( malloc_type == 1 )
5618
  if( malloc_type == 1 )
5619
    {
5619
    {
5620
#endif
5620
#endif
Lines 5626-5632 Link Here
5626
  if (MALLOC_POSTACTION != 0) {
5626
  if (MALLOC_POSTACTION != 0) {
5627
  }
5627
  }
5628
  return m;
5628
  return m;
5629
#ifndef KDE_MALLOC_FULL
5629
#ifndef TDE_MALLOC_FULL
5630
    }
5630
    }
5631
  if( malloc_type == 2 )
5631
  if( malloc_type == 2 )
5632
      return libc_pvalloc( bytes );
5632
      return libc_pvalloc( bytes );
Lines 5636-5642 Link Here
5636
}
5636
}
5637
5637
5638
Void_t* public_cALLOc(size_t n, size_t elem_size) {
5638
Void_t* public_cALLOc(size_t n, size_t elem_size) {
5639
#ifndef KDE_MALLOC_FULL
5639
#ifndef TDE_MALLOC_FULL
5640
  if( malloc_type == 1 )
5640
  if( malloc_type == 1 )
5641
    {
5641
    {
5642
#endif
5642
#endif
Lines 5648-5654 Link Here
5648
  if (MALLOC_POSTACTION != 0) {
5648
  if (MALLOC_POSTACTION != 0) {
5649
  }
5649
  }
5650
  return m;
5650
  return m;
5651
#ifndef KDE_MALLOC_FULL
5651
#ifndef TDE_MALLOC_FULL
5652
    }
5652
    }
5653
  if( malloc_type == 2 )
5653
  if( malloc_type == 2 )
5654
      return libc_calloc( n, elem_size );
5654
      return libc_calloc( n, elem_size );
Lines 5658-5664 Link Here
5658
}
5658
}
5659
5659
5660
void public_cFREe(Void_t* m) {
5660
void public_cFREe(Void_t* m) {
5661
#ifndef KDE_MALLOC_FULL
5661
#ifndef TDE_MALLOC_FULL
5662
  if( malloc_type == 1 )
5662
  if( malloc_type == 1 )
5663
    {
5663
    {
5664
#endif
5664
#endif
Lines 5668-5674 Link Here
5668
  cFREe(m);
5668
  cFREe(m);
5669
  if (MALLOC_POSTACTION != 0) {
5669
  if (MALLOC_POSTACTION != 0) {
5670
  }
5670
  }
5671
#ifndef KDE_MALLOC_FULL
5671
#ifndef TDE_MALLOC_FULL
5672
  return;
5672
  return;
5673
    }
5673
    }
5674
  if( malloc_type == 2 )
5674
  if( malloc_type == 2 )
Lines 5682-5688 Link Here
5682
}
5682
}
5683
5683
5684
struct mallinfo public_mALLINFo() {
5684
struct mallinfo public_mALLINFo() {
5685
#ifndef KDE_MALLOC_FULL
5685
#ifndef TDE_MALLOC_FULL
5686
  if( malloc_type == 1 )
5686
  if( malloc_type == 1 )
5687
    {
5687
    {
5688
#endif
5688
#endif
Lines 5695-5701 Link Here
5695
  if (MALLOC_POSTACTION != 0) {
5695
  if (MALLOC_POSTACTION != 0) {
5696
  }
5696
  }
5697
  return m;
5697
  return m;
5698
#ifndef KDE_MALLOC_FULL
5698
#ifndef TDE_MALLOC_FULL
5699
    }
5699
    }
5700
  if( malloc_type == 2 )
5700
  if( malloc_type == 2 )
5701
      return libc_mallinfo();
5701
      return libc_mallinfo();
Lines 5705-5711 Link Here
5705
}
5705
}
5706
5706
5707
int public_mALLOPt(int p, int v) {
5707
int public_mALLOPt(int p, int v) {
5708
#ifndef KDE_MALLOC_FULL
5708
#ifndef TDE_MALLOC_FULL
5709
  if( malloc_type == 1 )
5709
  if( malloc_type == 1 )
5710
    {
5710
    {
5711
#endif
5711
#endif
Lines 5717-5723 Link Here
5717
  if (MALLOC_POSTACTION != 0) {
5717
  if (MALLOC_POSTACTION != 0) {
5718
  }
5718
  }
5719
  return result;
5719
  return result;
5720
#ifndef KDE_MALLOC_FULL
5720
#ifndef TDE_MALLOC_FULL
5721
    }
5721
    }
5722
  if( malloc_type == 2 )
5722
  if( malloc_type == 2 )
5723
      return libc_mallopt( p, v );
5723
      return libc_mallopt( p, v );

Return to bug 860