C programming question

Jing Su jingsu-26n5VD7DAF2Tm46uYYfjYg at public.gmane.org
Fri Dec 19 18:26:01 UTC 2003


Still not sure exactly what you're looking for, but a few hints....

Well, the OS separates the address space of different processes, so there
is more work involved in sharing memory across different processes.

But, you can always point to any virtual address you want by setting a
void pointer to some address.  For example, you could do:
void* foo = 0xA0000000;
and write directly to that hex address (use with caution).

You can map files to memory using the mmap function... (do a man mmap).

-Jing

On Fri, 19 Dec 2003, John Wildberger wrote:

> Date: Fri, 19 Dec 2003 08:18:38 -0500
> From: John Wildberger <wildberger-iRg7kjdsKiH3fQ9qLvQP4Q at public.gmane.org>
> Reply-To: tlug-lxSQFCZeNF4 at public.gmane.org
> To: tlug-lxSQFCZeNF4 at public.gmane.org
> Subject: [TLUG]: C programming question
>
> To open a file for reading precludes to know the filename. I would like to
> read information from specific absolute RAM addresses. Is it possible to
> create a file that is located starting at such a specific address?. Any
> suggestion on how  to do this?
> John
> --
> The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
>
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list