[ion] Storage: increase size and indicates it in the header

This commit is contained in:
Émilie Feral
2018-09-21 14:28:16 +02:00
committed by LeaNumworks
parent 83042408b4
commit 0bcf3ec65c
2 changed files with 3 additions and 1 deletions

View File

@@ -63,7 +63,7 @@ public:
Record recordWithExtensionAtIndex(const char * extension, int index);
Record recordNamed(const char * name);
typedef uint16_t record_size_t;
constexpr static size_t k_storageSize = 4096;
constexpr static size_t k_storageSize = 16384;
private:
constexpr static uint32_t Magic = 0xEE0BDDBA;
constexpr static size_t k_maxRecordSize = (1 << sizeof(record_size_t)*8);

View File

@@ -25,6 +25,7 @@ public:
m_version{EPSILON_VERSION},
m_patchLevel{PATCH_LEVEL},
m_storageAddress(storageAddress),
m_storageSize(Ion::Storage::k_storageSize),
m_footer(Magic) { }
const char * version() const {
assert(m_storageAddress != nullptr);
@@ -44,6 +45,7 @@ private:
const char m_version[8];
const char m_patchLevel[8];
void * m_storageAddress;
size_t m_storageSize;
uint32_t m_footer;
};