MCPcopy Create free account
hub / github.com/apache/mesos / align

Function align

src/linux/ldcache.cpp:130–136  ·  view source on GitHub ↗

Returns a 'boundary' aligned pointer by rounding up to the nearest multiple of 'boundary'.

Source from the content-addressed store, hash-verified

128// Returns a 'boundary' aligned pointer by rounding up to
129// the nearest multiple of 'boundary'.
130static inline const char* align(const char* address, size_t boundary)
131{
132 if ((size_t)address % boundary == 0) {
133 return address;
134 }
135 return (address + boundary) - ((size_t)address % boundary);
136}
137
138
139Try<vector<Entry>> parse(const string& path)

Callers 1

parseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected