Parses /proc/self/maps in order to compile a list of all object file names for the modules that are loaded in the current process. Returns true on success.
| 607 | // for the modules that are loaded in the current process. |
| 608 | // Returns true on success. |
| 609 | bool CacheMemoryRegions() { |
| 610 | // Reads /proc/self/maps. |
| 611 | std::string contents; |
| 612 | if (!ReadProcMaps(&contents)) { |
| 613 | LOG(ERROR) << "Failed to read /proc/self/maps"; |
| 614 | return false; |
| 615 | } |
| 616 | |
| 617 | // Parses /proc/self/maps. |
| 618 | if (!ParseProcMaps(contents, ®ions_)) { |
| 619 | LOG(ERROR) << "Failed to parse the contents of /proc/self/maps"; |
| 620 | return false; |
| 621 | } |
| 622 | |
| 623 | is_initialized_ = true; |
| 624 | return true; |
| 625 | } |
| 626 | |
| 627 | // FIXME(gejun): Missing O_CLOEXEC from our linux headers. The flag should |
| 628 | // work on majority machines which installed 2.6.23 or newer kernels. But |
nothing calls this directly
no test coverage detected