mariadb/storage/ibmdb2i
Davi Arnaut a10ae35328 Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled
Essentially, the problem is that safemalloc is excruciatingly
slow as it checks all allocated blocks for overrun at each
memory management primitive, yielding a almost exponential
slowdown for the memory management functions (malloc, realloc,
free). The overrun check basically consists of verifying some
bytes of a block for certain magic keys, which catches some
simple forms of overrun. Another minor problem is violation
of aliasing rules and that its own internal list of blocks
is prone to corruption.

Another issue with safemalloc is rather the maintenance cost
as the tool has a significant impact on the server code.
Given the magnitude of memory debuggers available nowadays,
especially those that are provided with the platform malloc
implementation, maintenance of a in-house and largely obsolete
memory debugger becomes a burden that is not worth the effort
due to its slowness and lack of support for detecting more
common forms of heap corruption.

Since there are third-party tools that can provide the same
functionality at a lower or comparable performance cost, the
solution is to simply remove safemalloc. Third-party tools
can provide the same functionality at a lower or comparable
performance cost. 

The removal of safemalloc also allows a simplification of the
malloc wrappers, removing quite a bit of kludge: redefinition
of my_malloc, my_free and the removal of the unused second
argument of my_free. Since free() always check whether the
supplied pointer is null, redudant checks are also removed.

Also, this patch adds unit testing for my_malloc and moves
my_realloc implementation into the same file as the other
memory allocation primitives.
2010-07-08 18:20:08 -03:00
..
CMakeLists.txt Cleanup, use MYSQL_INSTALL_TARGETS macro instead of INSTALL(TARGETS) combined with 2009-12-12 02:03:05 +01:00
db2i_blobCollection.cc Add the IBM DB2 for i storage engine. 2009-02-15 03:18:30 +01:00
db2i_blobCollection.h Import the ibmdb2i-ga4-src snapshot from IBM 2009-03-09 15:20:14 -06:00
db2i_charsetSupport.cc The "hash_*" functions have got a prefix "my_" in 2008. 2009-11-17 13:55:42 +01:00
db2i_charsetSupport.h Add the IBM DB2 for i storage engine. 2009-02-15 03:18:30 +01:00
db2i_collationSupport.cc Bug#45196 Some collations do not sort correctly with IBMDB2I 2009-06-29 07:32:17 +05:30
db2i_collationSupport.h Import the ibmdb2i-ga4-src snapshot from IBM 2009-03-09 15:20:14 -06:00
db2i_constraints.cc Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
db2i_conversion.cc Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
db2i_errors.cc Bug#44232 Error msg should be improved when collation not supported. 2009-05-05 15:03:52 +05:30
db2i_errors.h Bug#44232 Error msg should be improved when collation not supported. 2009-05-05 15:03:52 +05:30
db2i_file.cc Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
db2i_file.h Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
db2i_global.h Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
db2i_iconv.h Add the IBM DB2 for i storage engine. 2009-02-15 03:18:30 +01:00
db2i_ileBridge.cc Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
db2i_ileBridge.h Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
db2i_ioBuffers.cc Import the ibmdb2i-ga4-src snapshot from IBM 2009-03-09 15:20:14 -06:00
db2i_ioBuffers.h Import the ibmdb2i-ga4-src snapshot from IBM 2009-03-09 15:20:14 -06:00
db2i_misc.h Bug#44811 Tests with utf8 charset fail with ibmdb2i on 64bit MySQL 2009-05-29 15:01:00 +05:30
db2i_myconv.cc Add the IBM DB2 for i storage engine. 2009-02-15 03:18:30 +01:00
db2i_myconv.h Bug#45803 Inaccurate estimates for partial key values with IBMDB2I 2009-07-06 14:19:32 +05:30
db2i_rir.cc Bug#45803 Inaccurate estimates for partial key values with IBMDB2I 2009-07-06 14:19:32 +05:30
db2i_safeString.h Add the IBM DB2 for i storage engine. 2009-02-15 03:18:30 +01:00
db2i_sqlStatementStream.cc Add the IBM DB2 for i storage engine. 2009-02-15 03:18:30 +01:00
db2i_sqlStatementStream.h Add the IBM DB2 for i storage engine. 2009-02-15 03:18:30 +01:00
db2i_validatedPointer.h Add the IBM DB2 for i storage engine. 2009-02-15 03:18:30 +01:00
ha_ibmdb2i.cc Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
ha_ibmdb2i.h Bug#45983 ibmdb2i_create_index_option=1 not working for primary key 2009-07-08 14:40:01 +05:30
Makefile.am Another incarnation of the patch for Bug#30708 2010-05-19 17:00:23 +04:00
plug.in Add the IBM DB2 for i storage engine. 2009-02-15 03:18:30 +01:00