Lines Matching defs:ga
559 static UWord stats__secmap_ga_space_covered = 0; // # ga bytes covered
685 static SecMap* shmem__find_SecMap ( Addr ga )
688 Addr gaKey = shmem__round_to_SecMap_base(ga);
720 static SecMap* shmem__find_or_alloc_SecMap ( Addr ga )
722 SecMap* sm = shmem__find_SecMap ( ga );
727 Addr gaKey = shmem__round_to_SecMap_base(ga);
3839 static void init_GroupAlloc ( /*MOD*/GroupAlloc* ga,
3852 tl_assert(ga);
3853 VG_(memset)(ga, 0, sizeof(*ga));
3854 ga->elemSzB = elemSzB;
3855 ga->nPerGroup = nPerGroup;
3856 ga->groups = NULL;
3857 ga->alloc = alloc;
3858 ga->cc = cc;
3859 ga->free = free;
3860 ga->groups = VG_(newXA)( alloc, cc, free, sizeof(void*) );
3861 ga->nextFree = NULL;
3862 tl_assert(ga->groups);
3868 static void gal_add_new_group ( GroupAlloc* ga )
3872 tl_assert(ga);
3873 tl_assert(ga->nextFree == NULL);
3874 group = ga->alloc( ga->cc, ga->elemSzB * ga->nPerGroup );
3879 for (i = ga->nPerGroup-1; i >= 0; i--) {
3880 UChar* elemC = ((UChar*)group) + i * ga->elemSzB;
3883 *elem = (UWord)ga->nextFree;
3884 ga->nextFree = elem;
3887 VG_(addToXA)( ga->groups, &group );
3890 inline static void* gal_Alloc ( GroupAlloc* ga )
3893 if (UNLIKELY(ga->nextFree == NULL)) {
3894 gal_add_new_group(ga);
3896 elem = ga->nextFree;
3897 ga->nextFree = (void*)*elem;
3902 inline static void* gal_Alloc_w_size_check ( GroupAlloc* ga, SizeT n )
3904 tl_assert(n == ga->elemSzB);
3905 return gal_Alloc( ga );
3908 inline static void gal_Free ( GroupAlloc* ga, void* p )
3911 *elem = (UWord)ga->nextFree;
3912 ga->nextFree = elem;