File pointer to a memory location?

Conor P. Cahill cpcahil at virtech.uucp
Tue Sep 11 10:13:58 AEST 1990


In article <119609 at linus.mitre.org> rtidd at ccels3.mitre.org (Randy Tidd) writes:
>What I do now is query the database, get a block of memory, dump this
>memory to a temporary file, open the file with a file pointer, and
>pass the file pointer to the image processing routines.  Not only is
>this dumb, but images can be a big as 3 megs and this is incredibly
>inefficient.
>
>Can anyone help me out?

1. best solution is to change your routines to accept a pointer to a memory
   area that has the image data

or

2. use the pipe like you had intended and on the recieving side (the read
   side of the pipe file descriptor pair) use fdopen() to assign a file 
   pointer to the file descriptor.

-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.,
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 



More information about the Comp.unix.programmer mailing list