10/2/2023 0 Comments Purebasic image memory allocation![]() if you really need true "real time" performance (for medical devices, process control, etc.) then you can't use windows anyway - it's just not a real-time os. a few milliseconds is a long, long time for the gc, but not for a human interacting with a piece of software, even a 'real time' game. net code that interacts with electronic derivatives exchanges, where time delays = lots of $$$, and we have never had a gc-related issue. net gc is very good at never taking much time to do a collection, unless you are in some kind of critical low-memory situation. net gc and libraries.Īs far as concerns about gc impacting 'real time' performance, i think those tend to be overblown. net managed code quite seamlessly, and take advantage of. ![]() net 'managed' dialect of c++) is an interesting possibility, particularly if you want to leverage your c++ experience. If you are targeting windows, c++/cli (microsoft's. Having consistent ways to manage memory is important anywhere.Īnother thing - is that memory is just one resource, you still have to keep track of other resources with a gc, so riaa.Īnyhow, c# - is a nice alternative in many respects, i find it a very nice language, especially the ability to write functional-style code in it (the cute lambda -> syntax, map/select 'linq' syntax etc), thus the possibility to write parallel code while it's still a 'standard curly-brackets', when you (or your colleagues) need it. you'll have to explicitly call the gc() as well, to keep the memory from fragmenting. deduce type, just like in *mlĪs for the memory management - for efficiency - you will have to keep good track of memory allocations, with or without garbage collection (ie, make memory-pools, re-use allocated object sometimes) anyhow, so that eventually whether your environment is garbage collected or not, matters less. If you need the one-does-nearly-all: try c++/cli (perhaps in combination with c# for easier syntax).Īs for the 'making me type far too much', c++0x seems to address most of itĪuto it = lotsofthingys.begin()) //. you need a certain library to get a feature that takes long to programm and you can only access the library with language x). the task has its own needs and these needs may chose the language for you (e.g. it has to be seen in the context of the task at hand. To sum it up: a programming language is a tool to reach a goal. ) and if you want to create some program that does not only display 3d-graphics, you might have other needs as well (input, sound, network, ai, database, gui. There are still a lot of projects/libraries i did not mention (xna, boost. You want to write a library? c / c++ might be a solution, since most of the world can use c / c++ libraries. You already have a toolchain? your libraries need to be able to handle the file formats. You need a gui as well? wxwidgets, qt might be a possiblity. You need it more portable? opengl for the rescue - though you might need some wrapper (e.g. for cryengine/unrealengine you won't have a real choice i guess. net as well, though the ports are not always up to date and plugins are not as easyly included as in the c++ versions. you need commercial grade quality (one might argue that ogre3d offers that) - go for cryengine or unreal. Perhaps you need a really good 3d-engine? try ogre3d or irrlicht. managed languages tend to be faster to programm and easier to debug. this - especially for 3d-graphics - includes libraries.ĭepending on the task, you may get away with some minor directx hacking. By the way you can also enable the virtual memory column in the task manager to see how much memory a process really tries to use.The best enviroment for your project is the one you get your task done in the fastest way possible. ![]() ![]() While it iterates over these 4294967297 IDs it reads the value from the array and because of that your operating system really has to commit that memory to your process and you can see that in the taskmanager. Now if your program ends, Purebasic wants to check if there are objects existing in that huge array of object ids and iterates over it. That's why your browser seems to have allocated 50GB of virtual memory but in reality it only uses 2GB or so. Your program's memory space exists only virtually and gets mapped to the real physical memory in the background or maybe to your swap device/file if your memory is full. If you allocate a bunch of memory your operating system will not take that into account until you really use it. I don't know how this is implemented internally but if there is an array that is dynamically resizing itself then that is terrible. The results are inconsistent depending on whether the numbers are provided in ascending or descending order.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |