Hi Janne,
Since size_t is unsigned, just test (size == 0). Otherwise Ok. Thanks
for the patch.
OK.
Übertrage Daten ...
Revision 175880 übertragen.
Thanks for the review!
Thomas
On Fri, Jul 1, 2011 at 21:31, Thomas Koenig wrote:
> Is this better?
Index: runtime/memory.c
===
--- runtime/memory.c(Revision 175598)
+++ runtime/memory.c(Arbeitskopie)
@@ -54,8 +54,8 @@ get_mem (size_t n)
void *
internal_
Am 01.07.2011 14:34, schrieb Janne Blomqvist:
On Thu, Jun 30, 2011 at 21:09, Thomas Koenig wrote:
Good point. I have done so in the attached patch
Seems you forgot to attach it.. ;)
Oops, I hadn't realized your crystal ball was broken :-)
Is this better?
Thomas
2011-06-30 Thom
On Thu, Jun 30, 2011 at 21:09, Thomas Koenig wrote:
> Good point. I have done so in the attached patch
Seems you forgot to attach it.. ;)
--
Janne Blomqvist
Hi Janne,
I'd prefer to add the zero check to runtime/memory.c
(internal_malloc_size), i.e. change
if (size == 0)
return NULL;
to
if (size == 0)
size = 1;
Good point. I have done so in the attached patch, plus removed
all special cases for checking for zero size.
Regression-tested.
On Wed, Jun 29, 2011 at 00:50, Thomas Koenig wrote:
> Hello world,
>
> looking at PR 49479 and other functions in the library made me realize
> there are lots of places where we don't malloc one byte for empty
> arrays.
I'd prefer to add the zero check to runtime/memory.c
(internal_malloc_size),