On Sunday, February 22, 2015, Gabriela Gibson <[email protected]>
wrote:
> Hi,
>
> I propose to do the following:
>
> 1) Replace all the calls to *allocs (malloc, calloc, realloc)
> {and also free()} with matching x* functions in DocFormats.
>
> 2) These new x*alloc functions will live in their respective
> platform/src files, and will contain a call to the original
> *alloc function and a simple exit handler.
>
> 3) I will create test cases in platform/tests/ for each of those
> functions. I can either put them in WrapperTests.c or create a
> new, MallocTests.c file for them.
>
> 4) I will start out with free(), just to be certain I get the shape right
> before I process the rest of the to-do list.
>
> 5) I will ship this as a 'git diff' files.
>
> What do you think?
+1, just go ahead.
The diff might be too for an email, so feel free to put it somewhere as a
zip so peter and/or me can grab it and review it.
Looking forward to see the result.
rgds
jan i
ps. if you see other system functions where we could do the same, please
note it.
>
> G
>
> On Wed, Feb 18, 2015 at 9:19 PM, Gabriela Gibson <
> [email protected] <javascript:;>>
> wrote:
>
> > Hi,
> >
> > Reading through the source, I see that a lot of mallocs() do not have a
> >
> > [[
> > if(foo == NULL) {
> > perror("Foo: Out of memory.\n");
> > return _exit(EXIT_FAILURE);
> > }
> > ]]
> >
> > check.
> >
> > I can add those if you like.
> >
> > G
> > --
> > Visit my Coding Diary: http://gabriela-gibson.blogspot.com/
> >
>
>
>
> --
> Visit my Coding Diary: http://gabriela-gibson.blogspot.com/
>
--
Sent from My iPad, sorry for any misspellings.