Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Latest SFML snapshot memory usage  (Read 1410 times)

0 Members and 1 Guest are viewing this topic.

N_K

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Latest SFML snapshot memory usage
« on: August 29, 2012, 11:26:18 pm »
Hi all,

Just out of curiosity: is it normal for SFML to use 40 megabytes of RAM, even when it does nothing (well, it does, it displays an empty, black window, and waits for the user to close the window)?

Interestingly, no matter how many objects I draw (so far, I've only tried text and sprites, but many of them), it never goes beyond 42, so my guess would be that SFML pre-allocates some space to avoid problems later. Is this correct?

If it is, what happens if I run an SFML app on a system with only 64 (or even 32) megabytes of RAM? Before the pre-allocation, does it takes the avaliable memory into consideration?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10996
    • View Profile
    • development blog
    • Email
Re: Latest SFML snapshot memory usage
« Reply #1 on: August 29, 2012, 11:31:48 pm »
The more important thing you should mention is, if you use debug or release builds, what optimisation flags, which OS and which compiler... ;)

On my system it doesn't always use 40 MiB and can also be bigger if I allocate more stuff. :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

N_K

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: Latest SFML snapshot memory usage
« Reply #2 on: August 30, 2012, 12:17:54 am »
Wow, sorry, I completely forgot about those things. The system is Win7, the compiler is Visual Studio 2010 Express, the optimization level is O2 (Maximize speed), and I tested the release build.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Latest SFML snapshot memory usage
« Reply #3 on: August 30, 2012, 09:49:06 am »
A minimal program takes 8 MB for me with VC++ 2008 under Windows 7 64 bits.
Laurent Gomila - SFML developer