• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Memory space in a shared, private framework
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory space in a shared, private framework


  • Subject: Re: Memory space in a shared, private framework
  • From: Sherm Pendley <email@hidden>
  • Date: Fri, 11 May 2007 08:19:26 -0400

On May 11, 2007, at 7:57 AM, Philip Dow wrote:

Let me see if I can clarify this the right way. Everything is being done with Cocoa/Obj-C. I'd like to create a private framework that is responsible for managing the data store of an application. Other applications would be able to link against this framework and use it to access the same data store.

My question concerns the "memory space" of the framework (is there a better name for this?). Does the framework occupy the same memory in both applications?

The framework's code is shared, that's all. Application data is stored on the heap and the stack, neither of which is normally shared with other applications.


For example, if one application added or modified an object, would the other application be aware of this change? Or does the framework exist independently in the two applications so that a change from one would not be noticed in the other?

You could arrange for such sharing to take place, if you wanted it to, through shared memory, distributed objects and/or notifications, and the like. But it won't happen by default.


The best example I can think of is the AddressBook framework. Many applications link against and use this framework. When one application changes an AB record via the framework, other applications immediately become aware of those changes, not only in the data model but also in the interface thanks to the AddressBookUI and bindings. Is this the de facto case with a shared framework or is the AddressBook framework doing something special here?

AddressBook is most likely just making changes to a common data store on disk, and then firing off a distributed notification. Upon receiving that notification, other AB instances can then simply reload any effected records from disk.


There very well may be some shared-memory arrangement behind the scenes, maybe using memory-mapped I/O for the data storage. If so, it would be the result of the AB framework being specifically written that way, not of any de facto default regarding frameworks.

sherm--

Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Memory space in a shared, private framework (From: Philip Dow <email@hidden>)

  • Prev by Date: Scope variable pattern
  • Next by Date: Re: Scope variable pattern
  • Previous by thread: Memory space in a shared, private framework
  • Next by thread: Scope variable pattern
  • Index(es):
    • Date
    • Thread