Standard Read and Write FILE functions to refer to memory
Date: 30 Nov 2004 11:54:01 -0800
I have huge number of legacy code which use standard files functions.
I would like to pass a memory pointer rather than a FILE pointer.
I am trying to use FILEs in the code to refer to memory buffers.
Basically, I want to be able to use all the standard read and write
functions, but I want them to refer to memory locations, rather than
disk
files.
I do not want to touch the legacy code. Does any one know of a library
to do this. I would appreciate the help.
Ben Beroukhim
Relevant Pages
- general memory handling and AddRef/Release q in MAPI
... Is there a general documentation about how and where to free memory or call ... ADRLIST memory must be freed individual, but as the documentation says here: ... memory pointer doesn't need to be freed. ... Or do I have to call AddRef() myself when I get the pointer ... (microsoft.public.win32.programmer.messaging) - Re: Standard Read and Write FILE functions to refer to memory
... > I would like to pass a memory pointer rather than a FILE pointer. ... Since the C file functions are file functions they operate on files. ... You could ask in a group dedicated to your system about RAM disks. ... (comp.lang.c) - Re: *** glibc detected *** double free or corruption: 0x086b6b90 ***
... I get this error when I create a memory pointer to print the string in ... memory *mp1; ... allocated memory before calling free. ... (comp.lang.c) - Re: How to transfer a memory block(not pointer) between two threads
... > Now I am try to transfer a memory pointer between two threads. ... Most likely you're running into a problem where you're allocating memory by ... memory using CoTaskMemAlloc and free it using CoTaskMemFree. ... (microsoft.public.dotnet.languages.vc) - Ever see anything like this?
... I'm working on some legacy code and came across something like this. ... Anybody know exactly what the ramifications are to the memory if you do ... leak that only lasts as long as the function since the mystruct memory ... (comp.lang.c) |
|