MCPcopy Create free account
hub / github.com/GJDuck/e9patch / saveMapping

Function saveMapping

src/e9patch/e9mapping.cpp:275–286  ·  view source on GitHub ↗

* Save a mapping into the set. */

Source from the content-addressed store, hash-verified

273 * Save a mapping into the set.
274 */
275static void saveMapping(Mapping *mapping, MappingSet &mappings)
276{
277 if (mapping == nullptr)
278 return;
279 Bounds b = calculateBounds(mapping);
280 mapping->lb = b.lb;
281 mapping->ub = b.ub;
282 mapping->prot = calculateProtections(mapping);
283 mapping->preload = calculatePreload(mapping);
284 insertMapping(mapping, mappings);
285 stat_num_virtual_mappings++;
286}
287
288/*
289 * Build the initial set of (unmerged) mappings from the virtual address

Callers 1

buildMappingsFunction · 0.85

Calls 4

calculateBoundsFunction · 0.85
calculateProtectionsFunction · 0.85
calculatePreloadFunction · 0.85
insertMappingFunction · 0.85

Tested by

no test coverage detected