Dynamic Shared Memory Allocation

Tarek A. El-Ghazawi, William Carlson, Thomas Sterling, Katherine Yelick · 2005

In this chapter we discussed the three different ways to allocate shared storage space under UPC. The function upc_all_alloc() is a collective function that is called by all threads and allocates one shared space and returns one pointer to the allocated space to the threads. The function upc_global_alloc() is a non collective version of the upc_all_alloc(). Each calling thread gets a separate shared space and is returned a different shared pointer to that space. Finally, upc_alloc() is a non collective function. When called, each calling thread gets a pointer to a shared space with affinity to the calling thread, and a different pointer is returned to each calling thread. To free the previously allocated space, one can use upc_free().

Read the paper · More papers on PaperTik