]> granicus.if.org Git - postgresql/commitdiff
dsa: Cope with the possibility that SIZE_MAX is not defined.
authorRobert Haas <rhaas@postgresql.org>
Mon, 5 Dec 2016 20:20:23 +0000 (15:20 -0500)
committerRobert Haas <rhaas@postgresql.org>
Mon, 5 Dec 2016 20:22:33 +0000 (15:22 -0500)
Per buildfarm member gaur and Tom Lane.

src/backend/utils/mmgr/dsa.c

index aa3ab58d38a730ba4b6a199b54d73f5386dd9ff4..abe3f1a63d19729c3b15bd0dadc41e365080e1b1 100644 (file)
@@ -1184,7 +1184,7 @@ create_internal(void *place, size_t size,
        control->segment_header.freed = false;
        control->segment_header.size = DSA_INITIAL_SEGMENT_SIZE;
        control->handle = control_handle;
-       control->max_total_segment_size = SIZE_MAX;
+       control->max_total_segment_size = (Size) -1;
        control->total_segment_size = size;
        memset(&control->segment_handles[0], 0,
                   sizeof(dsm_handle) * DSA_MAX_SEGMENTS);