@@ -276,11 +276,6 @@ static char dsa_size_class_map[] = {
276
276
*/
277
277
#define DSA_FULLNESS_CLASSES 4
278
278
279
- /*
280
- * Maximum length of a DSA name.
281
- */
282
- #define DSA_MAXLEN 64
283
-
284
279
/*
285
280
* A dsa_area_pool represents a set of objects of a given size class.
286
281
*
@@ -326,7 +321,6 @@ typedef struct
326
321
Size freed_segment_counter ;
327
322
/* The LWLock tranche ID. */
328
323
int lwlock_tranche_id ;
329
- char lwlock_tranche_name [DSA_MAXLEN ];
330
324
/* The general lock (protects everything except object pools). */
331
325
LWLock lock ;
332
326
} dsa_area_control ;
@@ -405,7 +399,7 @@ static void unlink_segment(dsa_area *area, dsa_segment_map *segment_map);
405
399
static dsa_segment_map * get_best_segment (dsa_area * area , Size npages );
406
400
static dsa_segment_map * make_new_segment (dsa_area * area , Size requested_pages );
407
401
static dsa_area * create_internal (void * place , size_t size ,
408
- int tranche_id , const char * tranche_name ,
402
+ int tranche_id ,
409
403
dsm_handle control_handle ,
410
404
dsm_segment * control_segment );
411
405
static dsa_area * attach_internal (void * place , dsm_segment * segment ,
@@ -419,12 +413,10 @@ static void check_for_freed_segments(dsa_area *area);
419
413
* We can't allocate a LWLock tranche_id within this function, because tranche
420
414
* IDs are a scarce resource; there are only 64k available, using low numbers
421
415
* when possible matters, and we have no provision for recycling them. So,
422
- * we require the caller to provide one. The caller must also provide the
423
- * tranche name, so that we can distinguish LWLocks belonging to different
424
- * DSAs.
416
+ * we require the caller to provide one.
425
417
*/
426
418
dsa_area *
427
- dsa_create (int tranche_id , const char * tranche_name )
419
+ dsa_create (int tranche_id )
428
420
{
429
421
dsm_segment * segment ;
430
422
dsa_area * area ;
@@ -446,7 +438,7 @@ dsa_create(int tranche_id, const char *tranche_name)
446
438
/* Create a new DSA area with the control objet in this segment. */
447
439
area = create_internal (dsm_segment_address (segment ),
448
440
DSA_INITIAL_SEGMENT_SIZE ,
449
- tranche_id , tranche_name ,
441
+ tranche_id ,
450
442
dsm_segment_handle (segment ), segment );
451
443
452
444
/* Clean up when the control segment detaches. */
@@ -474,12 +466,11 @@ dsa_create(int tranche_id, const char *tranche_name)
474
466
*/
475
467
dsa_area *
476
468
dsa_create_in_place (void * place , size_t size ,
477
- int tranche_id , const char * tranche_name ,
478
- dsm_segment * segment )
469
+ int tranche_id , dsm_segment * segment )
479
470
{
480
471
dsa_area * area ;
481
472
482
- area = create_internal (place , size , tranche_id , tranche_name ,
473
+ area = create_internal (place , size , tranche_id ,
483
474
DSM_HANDLE_INVALID , NULL );
484
475
485
476
/*
@@ -1139,7 +1130,7 @@ dsa_minimum_size(void)
1139
1130
*/
1140
1131
static dsa_area *
1141
1132
create_internal (void * place , size_t size ,
1142
- int tranche_id , const char * tranche_name ,
1133
+ int tranche_id ,
1143
1134
dsm_handle control_handle ,
1144
1135
dsm_segment * control_segment )
1145
1136
{
@@ -1192,7 +1183,6 @@ create_internal(void *place, size_t size,
1192
1183
control -> refcnt = 1 ;
1193
1184
control -> freed_segment_counter = 0 ;
1194
1185
control -> lwlock_tranche_id = tranche_id ;
1195
- strlcpy (control -> lwlock_tranche_name , tranche_name , DSA_MAXLEN );
1196
1186
1197
1187
/*
1198
1188
* Create the dsa_area object that this backend will use to access the
@@ -1204,8 +1194,6 @@ create_internal(void *place, size_t size,
1204
1194
area -> mapping_pinned = false;
1205
1195
memset (area -> segment_maps , 0 , sizeof (dsa_segment_map ) * DSA_MAX_SEGMENTS );
1206
1196
area -> high_segment_index = 0 ;
1207
- LWLockRegisterTranche (control -> lwlock_tranche_id ,
1208
- control -> lwlock_tranche_name );
1209
1197
LWLockInitialize (& control -> lock , control -> lwlock_tranche_id );
1210
1198
for (i = 0 ; i < DSA_NUM_SIZE_CLASSES ; ++ i )
1211
1199
LWLockInitialize (DSA_SCLASS_LOCK (area , i ),
@@ -1262,8 +1250,6 @@ attach_internal(void *place, dsm_segment *segment, dsa_handle handle)
1262
1250
memset (& area -> segment_maps [0 ], 0 ,
1263
1251
sizeof (dsa_segment_map ) * DSA_MAX_SEGMENTS );
1264
1252
area -> high_segment_index = 0 ;
1265
- LWLockRegisterTranche (control -> lwlock_tranche_id ,
1266
- control -> lwlock_tranche_name );
1267
1253
1268
1254
/* Set up the segment map for this process's mapping. */
1269
1255
segment_map = & area -> segment_maps [0 ];
0 commit comments