It is currently Thu, 20 Jun 2013 12:23:05 GMT



 
Author Message
 shared memory programming issue

I am writing a C++ development tool as part of a group for a college
course and need to use shared memory under UNIX (i.e. both Linux and
maybe SunOS v4). What I was wondering was if I can still use malloc and
related commands for allocating memory in the shared memory area.

I would appreciate any help so that I can settle an arguement about this
(I say that malloc can handle this and you don't need to write your own
functions).

If possible can you please email any replies as I cannot access this
list in college.

Thanks,

Andy Rice
andy.r...@{*filter*}.net



 Fri, 01 Sep 2000 03:00:00 GMT   
 shared memory programming issue

no.

Once you have access to the share memory, you do not allocate in it.  If
you want to write something, use writeshm.

http://www.**-**.com/ #SECTION00744000000000000000

Hope this helps.

D. Turner



 Fri, 01 Sep 2000 03:00:00 GMT   
 shared memory programming issue

[This is not completely relevant to the above posting,
 but I hope it helps ...]

You could try my library ``mmalloc''. It's derived from
the non-shared mmalloc library that ships with gdb, but
has additional locking so you can share memory between
processes (and it's persistent too ...). You use the
`mmalloc' and `mfree' commands to allocate and free
shared memory segments, which should be familiar to most
C programmers.

Eventually the code will go into the main gdb distribution,
but in the meantime mail me & I'll send it.

Rich.

--
Richard Jones  rjo...@orchestream.com Tel: +44 171 460 6141 Fax: .. 4461
Orchestream Ltd.  262a Fulham Rd.  London  SW10 9EL.  "you'll write in
PGP: www.four11.com     telegraphic, or you won't write at all" [Cline]
Copyright ? 1998 Richard W.M. Jones



 Sat, 02 Sep 2000 03:00:00 GMT   
 
   [ 3 post ] 

Similar Threads

1. Sharing A Device / Shared Memory Issues

2. Shared Memory Issue

3. Shared Memory, Apache 1.3 and other issues

4. Solaris 5.5.1: Questions on shared memory and the ipcs program

5. Crash Course in Programming w/ Shared Memory

6. PROGRAMMING: Sharing a Locked Memory

7. C programs sharing memory

8. Memory access between a program and a shared lib

9. Programming with shared memory?


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software