• 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
Multiple __DATA,__common segments/sections
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiple __DATA,__common segments/sections


  • Subject: Multiple __DATA,__common segments/sections
  • From: Isaac Dooley <email@hidden>
  • Date: Wed, 11 May 2005 23:48:15 -0500

Hi, I am trying essentially to write a user level thread system. Basically I need to have multiple sets of global variables that are accessible at different portions of a single program's execution. Essentially two or more threads will use the same set of global variable names, but they will expect to see their own unique values for the global variables while their own thread is executing. This is the best way to describe my project that I can think of, even though I am not really doing an explicity user level thread system. Hopefully this description will suffice.

I know that I can access the __common or __data sections from the DATA segment with getsectdata() and then do a memcpy to swap in and out the different sets of global variable data. However, these sections may be quite large, and will frequently be swapped around. Thus I am hoping there is a way to have the multiple sets of data(or entire segments) in virtual memory, and change some simple table or register to point to the segment/section that is currently needed. This can be done on IA32 systems, but I need it to work on the G5(and hopefully also G4) macs with OSX/darwin.

Please let me know if this is possible, as I really want to avoid these mem copies.

Thanks,
Isaac
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Setting file metadata, how?
  • Next by Date: Re: Problems building automount
  • Previous by thread: Re: Setting file metadata, how?
  • Next by thread: launchd checkin
  • Index(es):
    • Date
    • Thread