Results 1 to 2 of 2

Thread: QHash memory usage

  1. #1
    Join Date
    Oct 2010
    Posts
    55
    Thanks
    1
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    9

    Default QHash memory usage

    Hi!

    (How) can I measure how much memory a QHash is using?

    Qt Code:
    1. capacity() * sizeof(valuetype)
    To copy to clipboard, switch view to plain text mode 
    ... or?

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QHash memory usage

    Quote Originally Posted by helloworld View Post
    Hi!

    (How) can I measure how much memory a QHash is using?

    Qt Code:
    1. capacity() * sizeof(valuetype)
    To copy to clipboard, switch view to plain text mode 
    No, not really.

    ... or?
    Or you can use one of widely available solutions for measuring memory allocations in c/c++ applications. Or you can do the counting yourself based on QHash source code.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    helloworld (10th December 2010)

Similar Threads

  1. QHash : Virtual memory not released
    By jbenoit in forum Qt Programming
    Replies: 16
    Last Post: 14th November 2009, 16:35
  2. free up the memory used by QHash
    By vishal.chauhan in forum Qt Programming
    Replies: 8
    Last Post: 22nd June 2009, 19:13
  3. CPU and Memory Usage
    By philwinder in forum Qt Programming
    Replies: 16
    Last Post: 17th May 2008, 22:25
  4. QString memory usage
    By jogeshwarakundi in forum Newbie
    Replies: 1
    Last Post: 13th December 2007, 06:48
  5. How to determine memory usage?
    By nopalot in forum General Programming
    Replies: 3
    Last Post: 11th February 2007, 19:50

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.