>>However, the major API changes this also requires would be rather complex. >>If you're going to provide for callbacks, you obviously have to provide a >>method to actually tell the library what your callbacks are. And they have >>to propagate to _every_ function which might allocate or free memory. >>Hardly trivial.<<You need a set_ogg_malloc_handler(). That's it as far as the API goes. As for the implementation, I'd suggest making a two-three line function named ogg_malloc() that does the right thing. Do a grep through the ogg and vorbis source to change all instances of "malloc" to "ogg_malloc". Hardly non-trivial. _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com. --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
At 10:41 PM 10/23/00 GMT, you wrote:>>>However, the major API changes this also requires would be rather complex. >>>If you're going to provide for callbacks, you obviously have to provide a >>>method to actually tell the library what your callbacks are. And they have >>>to propagate to _every_ function which might allocate or free memory. >>>Hardly trivial.<< > >You need a set_ogg_malloc_handler(). That's it as far as the API goes.Assuming you consider it acceptable to store that information in global variables. Something that is done in _no_ other part of libvorbis. If you're going to do this, why not just compile in a different malloc function? It's more or less equivalent. There's no good reason to add this, that I can see. Michael --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Seemingly Similar Threads
- (no subject)
- [LLVMdev] Deriving undefined behavior from nsw/inbounds/poison for scalar evolution
- [LLVMdev] Deriving undefined behavior from nsw/inbounds/poison for scalar evolution
- [LLVMdev] Strong post-dominance in LLVM?
- ScalarEvolution "add nsw" question