1. SPS Accounts:
    Do you find yourself coming back time after time? Do you appreciate the ongoing hard work to keep this community focused and successful in its mission? Please consider supporting us by upgrading to an SPS Account. Besides the warm and fuzzy feeling that comes from supporting a good cause, you'll also get a significant number of ever-expanding perks and benefits on the site and the forums. Click here to find out more.
    Dismiss Notice
Dismiss Notice
You are currently viewing Boards o' Magick as a guest, but you can register an account here. Registration is fast, easy and free. Once registered you will have access to search the forums, create and respond to threads, PM other members, upload screenshots and access many other features unavailable to guests.

BoM cultivates a friendly and welcoming atmosphere. We have been aiming for quality over quantity with our forums from their inception, and believe that this distinction is truly tangible and valued by our members. We'd love to have you join us today!

(If you have any problems with the registration process or your account login, please contact us. If you've forgotten your username or password, click here.)

Neverwinter Nights Forum News (Jan. 02, 05)

Discussion in 'Game/SP News & Comments' started by chevalier, Jan 2, 2005.

  1. chevalier

    chevalier Knight of Everfull Chalice ★ SPS Account Holder Veteran

    Joined:
    Dec 14, 2002
    Messages:
    16,815
    Media:
    11
    Likes Received:
    58
    Gender:
    Male
    Here are today's Neverwinter Nights forum highlights, collected by NWVault. Please take into account that these are only single parts of various threads and should not be taken out of context. Bear in mind also that the posts presented here are copied as-is, and that any bad spelling and grammar does not get corrected on our end.

    Tim Smith, Tools Programmer

    found memory leak, please verify
    I would love to know how MemTurbo gets rid of memory leaks. Does it look into the future and discover that my program won't use that block of 512 bytes that I allocated 5 minutes ago?

    I think not.

    It seems to be little more than a working set and modified list purging utility. By purging working sets and moving pages from the modified list to the free list, applications will start faster since pages can be removed from the free list much faster than the modified list. The modified list is a list of pages which contain modified data. If that page needs to be used by another application, the contents of that page will have to be written to the page's assigned backing store. For most pages, the backing store is page file. For exe and dlls that don't need their pages modified can use the exe and dll file on the disk as their backing store. If there are no pages available in the free list or modified list, the operating system will automatically purge working sets to make pages available.

    The best I can tell is that MemTurbo does nothing the operating system normally does, it just changes when it does it.

    More:
    This is not true if the app is allocating the memory from Global System Memory. If it was allocated from the application heap the OS treats it differently and grabs it back at the end as you have suggested since it resides in the App's program space. But GSM is not handled that way since the OS allows you to allocate GSM for shared use between multiple running apps and you don't want the OS to deallocate it if one of the sharing programs shuts down. GSM memory does not reside in the program space of any app. When GSM is used it is the responsibility of the APP to keep track of it. The OS will never reclaim it though it does know which app was originally responsible for requesting it... As far as the OS is concerned in that case the memory is still in use by some app. One more note about GSM, there is far more GSM available to a programmer than app heap memory. So it is not uncommon practice at all to always use the vast GSM pool rather than worry about the heap running out of space. Many apps don't allocate heap memory at all but instead always use GSM blocks. Any app that has its own memory mangagement routines is virtually assured to be doing it using GSM unless it was written by morons. The Heap size is fixed for the app also whereas GSM is not -- another reason programmers like GSM over heap.
    GSM?

    If you are talking about the difference between using LocalAlloc and GlobalAlloc, the problems with LocalAlloc went away with Win32. GlobalAlloc and LocalAlloc now use the same heap. This heap is "non-system" memory (below 0x8000000) which is managed by the operating system and will be released when the process terminates.

    Most high level languages such as C/C++ build their own allocation systems on top of API such as HeapAlloc. For performance reasons, it would be silly to use GlobalAlloc for memory allocations unless you are building your own sub-allocation system on top of it. GlobalAlloc has performance problems.

    BTW, with Win32, GlobalAlloc does not allocated shared memory. To support old window messages such as a DDE and the clipboard, they had to add special processing to move that memory from one address space to another. (I am not totally clear on exactly what they did.)

    found memory leak, please verify
    Click Here

    GlobalAlloc uses the same heap as LocalAlloc in all Win32 operating systems. However, there are other things that the 9x series of operating system (95, 98, ME) fails to release as well as your NT series of operating systems (NT, W2K, XP). However, GlobalAlloc isn't one of them and as I said before, GlobalAlloc does not allocate shared memory. On Win32 operating systems, shared memory is done using memory mapped files.

    James Henley, Technical Designer

    Protection from uber-gamers?
    Honestly, my first suggestion would be to find a better place to play with more mature players, rather than have to stoop to their level of creating "uber" gear. Neverwinterconnections.com is the matching service I used to play on, and it's definitely one of the best if you're looking for a mature game. Might be worth checking out.
     
    Last edited by a moderator: Jan 3, 2018
Sorcerer's Place is a project run entirely by fans and for fans. Maintaining Sorcerer's Place and a stable environment for all our hosted sites requires a substantial amount of our time and funds on a regular basis, so please consider supporting us to keep the site up & running smoothly. Thank you!

Sorcerers.net is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to products on amazon.com, amazon.ca and amazon.co.uk. Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.