Commit graph

11 commits

Author SHA1 Message Date
marko
a310c56bbe Merge r1815:1817 from branches/zip: Improve Valgrind instrumentation.
UNIV_MEM_ASSERT_RW(): New macro, to check that the contents of a memory
area is defined.

UNIV_MEM_ASSERT_W(): New macro, to check that a memory area is writable.

UNIV_MEM_ASSERT_AND_FREE(): New macro, to check that the memory is
writable before declaring it free (unwritable).  This replaces UNIV_MEM_FREE()
in many places.

mem_init_buf(): Check that the memory is writable, and declare it undefined.

mem_erase_buf(): Check that the memory is writable, and declare it freed.
2007-09-06 12:46:50 +00:00
marko
3366420bd2 Port extra Valgrind instrumentation (UNIV_DEBUG_VALGRIND) from branches/zip. 2007-06-14 08:34:23 +00:00
marko
e8435b3e45 Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).  From now on, the following Emacs cc-mode settings apply
when indenting C function bodies in InnoDB:

(setq c-basic-offset 8)
(setq c-label-minimum-indentation 0)
(add-to-list 'c-offsets-alist '(c . 0))
(add-to-list 'c-offsets-alist '(label . [0]))

The indentation rules for function declarations still have not been
formalized, and they must be formatted manually.

Try to limit all lines to at most 79 characters (assuming TAB stops every
8 characters) by splitting lines before opening parenthesis, or at
string constants.

Fix some grammar mistakes in diagnostic output:
 match to, match with -> match
 found from -> found in
 trying rename -> trying to rename

Fix an error in page_check_dir(): it said "supremum not pointed to"
when the infimum was not pointed to.

Enclose commented-out code snippets in #if 0 ... #endif instead of /* ... */.
Add (void*) casts to some %p parameters in fprintf() calls.  Try to
split lines before a binary operator, not after one.  (These three fixes
were not made everywhere.)
2006-08-28 17:42:45 +00:00
osku
630b0ecdb9 mem_heap_cat(): Remove void* arithmetic. 2006-06-15 04:41:52 +00:00
osku
7a39d1d6e4 Add mem_heap_printf() and mem_heap_cat(). 2006-05-11 04:55:18 +00:00
osku
3215330058 Add mem_heap_dup(). 2006-04-26 12:17:36 +00:00
osku
e83b1a8b3e Add mem_heap_strcat(). 2006-04-17 08:13:07 +00:00
osku
a7355764e9 Change ut_print_buf() and mem_analyze_corruption() to take a void*, not a
byte*. Remove redundant casts from callers.
2006-03-06 09:45:04 +00:00
osku
6be49d6766 Style cleanups: Convert spaces to tabs, remove trailing whitespace, other
misc cleanups.
2006-02-21 12:37:54 +00:00
osku
ecb2158f57 Fix comments for memory allocation functions and add some extra checks.
Adapt callers.
2005-11-04 14:20:11 +00:00
osku
c307820962 Import 5.0 code. 2005-10-27 07:29:40 +00:00