guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: binary interface


From: Keisuke Nishida
Subject: Re: binary interface
Date: Thu, 01 Mar 2001 22:27:56 -0500
User-agent: Wanderlust/2.4.0 (Rio) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/21.0.96 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

At Mon, 26 Feb 2001 12:27:25 +0100 (MET),
Dirk Herrmann wrote:
> 
> > In this case, all objects are actually written when you close the port,
> > right?  But if you want to copy objects using a network port, that is
> > probably not what you want. (Or maybe we shouldn't use a network port.)
> 
> No, sorry for being unclear.  I think, binary-write should write its
> object at once with all dependant objects.  In other words, binary-write
> guarantees to write the object and all dependant objects in their state at
> the moment that binary-write was called (let's ignore threading here...).
> No information about object sharing is preserved between two consecutive
> calls to binary-write to the same port. Thus, it is a _user_level_ trick
> to put multiple objects into a vector and then write that vector as a
> single object.

Oh, I see.  That's a simple solution.  If people are satisfied with
that, I don't need to modify the current implementation.

> > (Just a quick response.)  I want to load bytecode using mmap so that
> > several processes can share the same memory.  Isn't it a good reason
> > enough?
> 
> I don't understant that.  Why is sharing of memory dependent of the
> question whether you choose a binary representation for storing?

Because that way we can use shared mmap:

  From `man mmap':
       MAP_SHARED Share this mapping  with  all  other  processes
                  that map this object.  Storing to the region is
                  equivalent to writing to the  file.   The  file
                  may  not  actually be updated until msync(2) or
                  munmap(2) are called.

Or do you mean we can use it with a text representation as well?
But how?  Maybe like this?

  #B16 @address@hidden@address@hidden@#

I can't use strings for storing bytecodes because I don't want to
insert `\' to quote `"'.

A text representation might be better because it could reduce
file size, but I'm not sure how much it would.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]