Need to rework the memory allocator so that we can use GS memory management rather than the system malloc. Assigned it to Ralph for now, but it may well be reassigned to me.
Please explain better what do you mean here. I changed assignment to myself because I'm the ownwer of the memory management.
What is desired is to modify sjbig2.c and sjbig2_luratech.c so that the library uses the ghostscript allocator through callbacks rather than system malloc() as is currently implemented. The changes also seem to require some modifications to the allocator callbacks in the jbig2dec which don't currently include a user data pointer. This isn't an issue with the luratech library. This bug has nothing to do with the memory manager itself.
I'm still unclear what has to be done here because I don't see memory namager calls in sjbig2.c . Please make the report to be understandable for the staff. Please change the bug title to reflect the problem. Passing to Ralph who says it's a jbig2 bridge proiblem, and jbig2.dev is owned by Ralph.
The bug title doesn't mention the memory manager, it mentions memory management work. The work does relate to memory management, the problem at the moment is that the code is using the system malloc, not the Ghostscript memory manager. It would obviously be preferable to use the Ghostscript memory manger (potentially even vital on some embedded systems). I looked into this, because Ralph mentioned that it should already be possible to use the GS memory manager. Unfortunately I found that the memory allocator in jbig2dec was incompatible with the GS memory manager routines. In order to make the two compatible, some kind of glue (or bridge if you prefer) is required. So at the moment the jbig2dec memory management is incorrect because it is not using the GS memory manager. Work is needed on the management of memory in the jbig2dec product in order to use the correct memory manager. The work is on the management of memory in jbig2dec, not the memory manager. Does this make the situation clear ?
Yes it is. Thank you.
Enhancement still missing in Ghostscript 9.03
Assigning to Alex who is currently doing a similar project with the Luratech component.
Assigning to henry as the owner of decoders. Henry the 'problem' is outlined in comment #4, that jbig2dec doesn't use the Ghostscript memory manager. I have no idea if the Luratech equivalent was done, I assume it was.
*** Bug 694560 has been marked as a duplicate of this bug. ***
I just had a check in ghostpdl's source code and the jbig2dec interface has been extended by me to accommodate a custom allocator and base/sjbig2.c has been updated to provide a glue layer to the ghostscript memory allocator. Based on that this appear to be fixed, I close this bug.