Commit af02e27e authored by konstantin@mysql.com's avatar konstantin@mysql.com

fix for bug #1634 '"operator new" in my_new wastes memory'

parent 76ff0478
...@@ -48,6 +48,7 @@ jcole@sarvik.tfr.cafe.ee ...@@ -48,6 +48,7 @@ jcole@sarvik.tfr.cafe.ee
jcole@tetra.spaceapes.com jcole@tetra.spaceapes.com
jorge@linux.jorge.mysql.com jorge@linux.jorge.mysql.com
kaj@work.mysql.com kaj@work.mysql.com
konstantin@mysql.com
kostja@oak.local kostja@oak.local
lenz@kallisto.mysql.com lenz@kallisto.mysql.com
lenz@mysql.com lenz@mysql.com
......
...@@ -25,12 +25,12 @@ ...@@ -25,12 +25,12 @@
void *operator new (size_t sz) void *operator new (size_t sz)
{ {
return (void *) malloc (sz ? sz+1 : sz); return (void *) malloc (sz ? sz : 1);
} }
void *operator new[] (size_t sz) void *operator new[] (size_t sz)
{ {
return (void *) malloc (sz ? sz+1 : sz); return (void *) malloc (sz ? sz : 1);
} }
void operator delete (void *ptr) void operator delete (void *ptr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment