Method and apparatus for sharing code containing references to non-shared objects

   
   

A system is described that facilitates sharing an object containing embedded references to non-shared objects, which may be located at different virtual memory addresses in different processes. During operation, the system looks up the object in a shared memory area, wherein the shared memory area is mapped to the same virtual address by all sharing processes. If the object does not exist in the shared memory area, the system creates the object within the shared memory area, and sets embedded references in the object to point to entries in an indirection table located at a second virtual address, wherein each sharing process maintains its own private version of the indirection table at the same second virtual address. Next, the system performs a private initialization operation on the object for a specific process by setting references in the private version of the indirection table for the specific process to point to non-shared objects located in a private memory area for the specific process. In this way, the system allows each sharing process to maintain its own private versions of the non-shared objects.

Ένα σύστημα περιγράφεται που διευκολύνει τη διανομή ενός αντικειμένου που περιέχει τις ενσωματωμένες αναφορές στα μη-κοινά αντικείμενα, τα οποία μπορούν να βρεθούν στις διαφορετικές διευθύνσεις εικονικής μνήμης στις διαφορετικές διαδικασίες. Κατά τη διάρκεια της λειτουργίας, το σύστημα ανατρέχει το αντικείμενο σε μια κοινή περιοχή μνήμης, όπου η κοινή περιοχή μνήμης χαρτογραφείται στην ίδια εικονική διεύθυνση από όλους που μοιράζονται τις διαδικασίες. Εάν το αντικείμενο δεν υπάρχει στην κοινή περιοχή μνήμης, το σύστημα δημιουργεί το αντικείμενο μέσα στην κοινή περιοχή μνήμης, και θέτει τις ενσωματωμένες αναφορές στο αντικείμενο για να δείξει τις καταχωρήσεις σε έναν πίνακα indirection που βρίσκεται σε μια δεύτερη εικονική διεύθυνση, όπου κάθε διαδικασία διανομής διατηρεί την ιδιωτική έκδοσή της του πίνακα indirection στην ίδια δεύτερη εικονική διεύθυνση. Έπειτα, το σύστημα εκτελεί μια ιδιωτική λειτουργία έναρξης στο αντικείμενο για μια συγκεκριμένη διαδικασία με τον καθορισμό των αναφορών στην ιδιωτική έκδοση του πίνακα indirection για τη συγκεκριμένη διαδικασία για να δείξει τα μη-κοινά αντικείμενα που βρίσκονται σε μια ιδιωτική περιοχή μνήμης για τη συγκεκριμένη διαδικασία. Κατ' αυτό τον τρόπο, το σύστημα επιτρέπει σε κάθε διαδικασία διανομής για να διατηρήσει τις ιδιωτικές εκδόσεις του των μη-κοινών αντικειμένων.

 
Web www.patentalert.com

< Method, system, program, and data structures for using a database to apply patches to a computer system

< Mapping logical row identifiers for primary B+tree-like structures to physical row identifiers

> Computing system and method for preparing a computer-readable medium

> System and process for managing content organized in a tag-delimited template using metadata

~ 00135