<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/slang/memory_pool.cpp, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2018-09-14T18:16:28+00:00</updated>
<entry>
<title>Improvements around IR representation and memory usage (#635)</title>
<updated>2018-09-14T18:16:28+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2018-09-14T18:16:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=3c505c22673701339d35eb2151f01c16eb3c78c3'/>
<id>urn:sha1:3c505c22673701339d35eb2151f01c16eb3c78c3</id>
<content type='text'>
* * Remove dispose from IRInst
* Use MemoryArena instead of MemoryPool
* Make all IRInst not require Dtor - by having ref counted array store ptrs that need freeing

* Increase block size - typically compilation is 2Mb of IR space(!)

* Fix issues around StringRepresentation::equal because null has special meaning.

* Don't bother to construct as String to compare StringRepresentation, just used UnownedStringSlice.

* Added fromLiteral support to UnownedStringSlice and use instead of strlen version.

* Use more conventional way to test StringRepresentation against a String.

* Fix gcc/clang template problem with cast.
</content>
</entry>
<entry>
<title>Fix IR memory leaks.</title>
<updated>2018-02-19T20:26:26+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2018-02-19T18:00:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ff8adf7b45121aada0b4f4403b0f45a6e2dfe475'/>
<id>urn:sha1:ff8adf7b45121aada0b4f4403b0f45a6e2dfe475</id>
<content type='text'>
1, make IRModule class own a memory pool for all IR object allocations
2. For now, we allow IR objects to own other (externally) heap allocated objects, such as String, List and RefPtrs by tracking all IR objects that  has been allocated for the IRModule in a list named `IRModule::irObjectsToFree`. and call destructor for all these objects upon the destruction of the IRModule. In the long term, we should eliminate the use of all these externally allocated types in IR system and get rid of this tracking and explicit destructor calls.
3. remove non-generic `createValueImpl` functions and retain only generic versions in IRBulider so we can properly call the constructor of the IR types to set up virtual tables correctly for destructor dispatching.
4. add `MemoryPool` class for allocation of the IR objects.
5. Make sure we are disposing IRSpecContexts when we are done with the specialized IR module.
6. Add `_CrtDumpMemoryLeaks()` calls to check memory leaks upon destruction of a Slang session. If we are to support multiple sessions at a time, this call should probably be replaced with the more advanced MemoryState versions of the memory leak checker.
</content>
</entry>
</feed>
