mirror of
https://review.haiku-os.org/haiku
synced 2025-01-19 13:01:29 +01:00
packagefs: Don't bother with depots for most of the object caches.
We want them for the heap buffers, but the rest will generally only be used when other packagefs locks are acquired (during mounting or unmounting of packages), so the depots are just a waste.
This commit is contained in:
parent
d4d360a0d7
commit
e5f569eedd
@ -1086,11 +1086,12 @@ packagefs_std_ops(int32 op, ...)
|
||||
PackageFileHeapAccessorBase::sChunkCache =
|
||||
create_object_cache_etc("pkgfs heap buffers",
|
||||
PackageFileHeapAccessorBase::kChunkSize, sizeof(void*),
|
||||
0, /* magazine capacity, count */ 2, 1, 0, NULL,
|
||||
NULL, NULL, NULL);
|
||||
0, /* magazine capacity, count */ 2, 1,
|
||||
0, NULL, NULL, NULL, NULL);
|
||||
TwoKeyAVLTreeNode<void*>::sNodeCache =
|
||||
create_object_cache("pkgfs TKAVLTreeNodes",
|
||||
sizeof(TwoKeyAVLTreeNode<void*>), 8, NULL, NULL, NULL);
|
||||
create_object_cache_etc("pkgfs TKAVLTreeNodes",
|
||||
sizeof(TwoKeyAVLTreeNode<void*>), 8,
|
||||
0, 0, 0, CACHE_NO_DEPOT, NULL, NULL, NULL, NULL);
|
||||
|
||||
error = PackageFSRoot::GlobalInit();
|
||||
if (error != B_OK) {
|
||||
|
@ -18,8 +18,8 @@
|
||||
if (size != sizeof(CLASS)) \
|
||||
panic("unexpected size passed to operator new!"); \
|
||||
if (s##CLASS##Cache == NULL) { \
|
||||
s##CLASS##Cache = create_object_cache("pkgfs " #CLASS "s", \
|
||||
sizeof(CLASS), 8, NULL, NULL, NULL); \
|
||||
s##CLASS##Cache = create_object_cache_etc("pkgfs " #CLASS "s", \
|
||||
sizeof(CLASS), 8, 0, 0, 0, CACHE_NO_DEPOT, NULL, NULL, NULL, NULL); \
|
||||
} \
|
||||
\
|
||||
return object_cache_alloc(s##CLASS##Cache, 0); \
|
||||
|
Loading…
x
Reference in New Issue
Block a user