mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 11:09:37 -06:00
Update Ghoul repository
Adapt to Ghoul changes in MemoryPool
This commit is contained in:
Submodule ext/ghoul updated: c342cf9d25...26de570dec
@@ -121,7 +121,7 @@ public:
|
||||
* and all of the property & asset changes that were made since startup.
|
||||
*/
|
||||
void saveCurrentSettingsToProfile(const properties::PropertyOwner& rootOwner,
|
||||
const std::string& currentTime,
|
||||
std::string currentTime,
|
||||
interaction::NavigationHandler::NavigationState navState);
|
||||
|
||||
/// If the value passed to this function is 'true', the addAsset and removeAsset
|
||||
|
||||
@@ -35,10 +35,8 @@ public:
|
||||
ghoul::MemoryPool<8 * 1024 * 1024, false> PersistentMemory;
|
||||
|
||||
// This should be replaced with a std::pmr::memory_resource wrapper around our own
|
||||
// Memory pool. Resetting the monotoic_buffer_resource costs an allocation, that we
|
||||
// can prevent
|
||||
std::pmr::monotonic_buffer_resource TemporaryMemory =
|
||||
std::pmr::monotonic_buffer_resource(100 * 4096);
|
||||
// Memory pool so that we can get a high-water mark out of it
|
||||
ghoul::MemoryPool<100 * 4096, false> TemporaryMemory;
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -85,7 +85,7 @@ Connection::Connection(std::unique_ptr<ghoul::io::Socket> s,
|
||||
AuthenticationTopicKey,
|
||||
[password](bool, const ghoul::Dictionary&, ghoul::MemoryPoolBase* pool) {
|
||||
if (pool) {
|
||||
void* ptr = pool->alloc(sizeof(AuthorizationTopic));
|
||||
void* ptr = pool->allocate(sizeof(AuthorizationTopic));
|
||||
return new (ptr) AuthorizationTopic(password);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -80,7 +80,7 @@ void SyncModule::internalInitialize(const ghoul::Dictionary& configuration) {
|
||||
"HttpSynchronization",
|
||||
[this](bool, const ghoul::Dictionary& dictionary, ghoul::MemoryPoolBase* pool) {
|
||||
if (pool) {
|
||||
void* ptr = pool->alloc(sizeof(HttpSynchronization));
|
||||
void* ptr = pool->allocate(sizeof(HttpSynchronization));
|
||||
return new (ptr) HttpSynchronization(
|
||||
dictionary,
|
||||
_synchronizationRoot,
|
||||
@@ -101,7 +101,7 @@ void SyncModule::internalInitialize(const ghoul::Dictionary& configuration) {
|
||||
"UrlSynchronization",
|
||||
[this](bool, const ghoul::Dictionary& dictionary, ghoul::MemoryPoolBase* pool) {
|
||||
if (pool) {
|
||||
void* ptr = pool->alloc(sizeof(UrlSynchronization));
|
||||
void* ptr = pool->allocate(sizeof(UrlSynchronization));
|
||||
return new (ptr) UrlSynchronization(
|
||||
dictionary,
|
||||
_synchronizationRoot
|
||||
|
||||
@@ -1062,7 +1062,7 @@ void OpenSpaceEngine::preSynchronization() {
|
||||
FileSys.triggerFilesystemEvents();
|
||||
|
||||
// Reset the temporary, frame-based storage
|
||||
global::memoryManager.TemporaryMemory.release();
|
||||
global::memoryManager.TemporaryMemory.reset();
|
||||
|
||||
if (_hasScheduledAssetLoading) {
|
||||
LINFO(fmt::format("Loading asset: {}", _scheduledAssetPathToLoad));
|
||||
@@ -1260,6 +1260,8 @@ void OpenSpaceEngine::postDraw() {
|
||||
_isFirstRenderingFirstFrame = false;
|
||||
}
|
||||
|
||||
global::memoryManager.PersistentMemory.housekeeping();
|
||||
|
||||
LTRACE("OpenSpaceEngine::postDraw(end)");
|
||||
}
|
||||
|
||||
|
||||
@@ -454,7 +454,7 @@ namespace {
|
||||
} // namespace
|
||||
|
||||
void Profile::saveCurrentSettingsToProfile(const properties::PropertyOwner& rootOwner,
|
||||
const std::string& currentTime,
|
||||
std::string currentTime,
|
||||
interaction::NavigationHandler::NavigationState navState)
|
||||
{
|
||||
version = Profile::CurrentVersion;
|
||||
@@ -476,7 +476,7 @@ void Profile::saveCurrentSettingsToProfile(const properties::PropertyOwner& root
|
||||
// add current time to profile file
|
||||
//
|
||||
Time t;
|
||||
t.time = currentTime;
|
||||
t.time = std::move(currentTime);
|
||||
t.type = Time::Type::Absolute;
|
||||
time = std::move(t);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user