Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. check memory block/buffer using QBuffer?
Forum Updated to NodeBB v4.3 + New Features

check memory block/buffer using QBuffer?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 741 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xianerzaiwai
    wrote on last edited by
    #1

    My application has custom data type of large size, say ca. 10MB. In order to avoid too much memory burden, I'd like to write a function/Interface to check the memory block/buffer allocated for the objects of this custom data type. Thru Google I come across QBuffer and QDataStream for a possible solution. However I have no idea, how to specify the maxsize of the Memory block/buffer with help of QBuffer togather with QDataStream. Please give me kindly suggestions on:

    1. is there means to check the Memory block/buffer allocated for the object of a large custom data type?
    2. how to specify the size of QBuffer or QDataStream at a favorite Level?

    Thanks alot in advance!

    1 Reply Last reply
    0
    • T Offline
      T Offline
      topse
      wrote on last edited by
      #2

      What do you mean by check??

      1 Reply Last reply
      0
      • X Offline
        X Offline
        xianerzaiwai
        wrote on last edited by
        #3

        my check means:

        1. at beginning, a specified amount of memory will be allocated for the storage of later instantiated objects of this custom data type,
        2. at runtime, a new object of this type must be saved/written in this memory block.
        3. at runtime, the total memory of the created objects of this type must be small than the specified Limit. At that rate, the available memory must be checked before a new object is saved in the memory region.
        4. at end, the Memory block should be deleted.
        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved