MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / CodeCacheArray

Class CodeCacheArray

src/codeCache.h:219–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217
218
219class CodeCacheArray {
220 private:
221 CodeCache* _libs[MAX_NATIVE_LIBS];
222 int _count;
223 size_t _used_memory;
224
225 public:
226 CodeCacheArray() : _count(0) {
227 }
228
229 CodeCache* operator[](int index) {
230 return _libs[index];
231 }
232
233 int count() {
234 return loadAcquire(_count);
235 }
236
237 size_t usedMemory() {
238 return _used_memory;
239 }
240
241 void add(CodeCache* lib) {
242 int index = loadAcquire(_count);
243 _libs[index] = lib;
244 _used_memory += lib->usedMemory();
245 storeRelease(_count, index + 1);
246 }
247};
248
249#endif // _CODECACHE_H

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected