mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Refactor Code Cache
* reduce FILE I/O to accelerate load/store process * add code caching functions for clean code Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
parent
59a626b871
commit
93d4648908
6 changed files with 418 additions and 276 deletions
|
|
@ -654,9 +654,10 @@ void CodeCacheReader::CacheBuffer::resize(size_t size)
|
|||
|
||||
void CodeCacheReader::CacheBuffer::reset()
|
||||
{
|
||||
free(m_buffer);
|
||||
|
||||
m_buffer = nullptr;
|
||||
if (m_buffer) {
|
||||
free(m_buffer);
|
||||
m_buffer = nullptr;
|
||||
}
|
||||
m_capacity = 0;
|
||||
m_index = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue