[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] m68000 version of Zorro's LDG codec



Le 27/09/12 21:28, OL a écrit :

mem.ldg and libshare have never been need. MEM.LDG is only a small lib to provide libc like api for memory management without libc thats all.

Yes it is !

For example, look inside the file "pic_load.c", zView send memory pointers to the codecs. If this memory are allocated with the standard malloc(), the application can/will become unstable.

You can send memory allocated by malloc() to the codec without problem and use it

I have never looked inside the LDG code( I mean the library itself) but 10 years ago, I'm sure that Arnaud Bercegeay said me that it was crucial that memory allocated with malloc() is not send to the LDG.

If I remember well, he explained that an application can't write in a memory block owned by another application and that a crash could happen at any time( specially with the MP).

But after all, you are one of the author( with Arnaud) of the LDG library so you know the problem better that me.


but of course you can't use in the codec libc function like realloc(), free() because if you not share libc of the application the libc of the codec don't know how to manage it because it not allocate itself but this is the only restriction that look simple.

This is the prupose of libshare, no?


--
Zorro