[Bug target/89005] New: [nvptx, libgomp] Too much memory allocated in map_init

vries at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 23 08:03:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89005

            Bug ID: 89005
           Summary: [nvptx, libgomp] Too much memory allocated in map_init
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Before "[nvptx] Remove use of CUDA unified memory in libgomp", in map_init we
allocated a page-sized chunk of page-locked memory, which was used to provide
the memory for all subsequent map_push calls.

After mentioned commit, map_push allocates host and device memory, if needed.
map_init though allocates an initial element, which happens to be ...
paged-sized.

While it's not wrong to allocate an initial element, although it's not clear to
me whether it's beneficial, allocating one of this size is probably overdoing
it.

We should reduce the size of the initial element, or drop it altogether.


More information about the Gcc-bugs mailing list