ataylor Posted August 25, 2016 Posted August 25, 2016 I was experimenting with enabling and disabling different preprocessor definitions. I disabled USE_MEMORY and found that the engine project would not compile without it: "error C2653: 'Memory' : is not a class or namespace name" in many source files.
shodan Posted August 25, 2016 Posted August 25, 2016 Thanks for pointing this out. I just checked and most of the build errors seem to be caused by using our own memcpy() and memset() implementations. While these were useful and a bit quicker a while ago, nowadays they might be redundant. We're going to re-benchmark and either remove them, or add wrappers, so that the engine builds with disabled USE_MEMORY just as well. Just out of curiosity, why exactly are you trying this type of a build? The reason I'm asking, we pool and speedup somewhat tiny allocations, and wrapper API calls create quite a few of those. So unless you link against another allocator that optimizes for this case, you might suffer a certain performance penalty.
ataylor Posted August 25, 2016 Author Posted August 25, 2016 Hi Andrew. This was mostly just an experiment I tried on a whim. I am trying to track down some memory leaks in our application, and I wanted to rule out Unigine's custom memory allocators and deallocators as being part of the problem. I have worked with other projects using homegrown memory allocation tools and generally found them to be redundant and/or inefficient like you said. I don't think Unigine's custom allocators are necessarily causing problems, but nevertheless I believe each preprocessor definition ought to be optional, and it seems USE_MEMORY currently is required.
silent Posted September 5, 2016 Posted September 5, 2016 Hi Adam, USE_MEMORY define is no longer required for corrent engine build. Fix will be available in the next SDK update. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts