Results 1 to 2 of 2

Thread: Severe problem commit_and_inc: VirtualAlloc failed

  1. #1
    Join Date
    Apr 2007
    Posts
    117
    Thanks
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Severe problem commit_and_inc: VirtualAlloc failed

    This is a normal c++ question. not related to Qt but there's not one c++ forum out there that solved this problem...On running my function I encounter this

    " commit_and_inc: VirtualAlloc failed"

    This happens when I run these lines.
    Qt Code:
    1. quadrant_4D[1][1][1][1]=getPixelCount(widths[1], heights[1], widths[2],
    2. heights[2], outputImage1);
    3. quadrant_4D[1][1][1][2]=getPixelCount(widths[2], heights[1], widths[3],
    4. heights[2], outputImage1);
    To copy to clipboard, switch view to plain text mode 

    When I run only the first line,
    Qt Code:
    1. quadrant_4D[1][1][1][1]=getPixelCount(widths[1], heights[1], widths[2],
    2. heights[2], outputImage1)
    To copy to clipboard, switch view to plain text mode 
    . the VirtualAlloc problem does not occur

    here is the deginition of getPixelCount
    Qt Code:
    1. int getPixelCount(int x1, int y1, int x2, int y2, RGBImage image) {
    2. int count = 0;
    3. int x, y = 0;
    4. for (x = x1; x < x2; x++) {
    5. for (y = y1; y < y2; y++) {
    6. if (image(x, y) == COLOR_RGB(0,0,0)) {
    7. count++;
    8. }
    9. }
    10. }
    11. return count;
    12. }
    To copy to clipboard, switch view to plain text mode 
    Image Analysis Development Framework Using Qt (IADFUQ)

  2. #2
    Join Date
    Apr 2007
    Posts
    117
    Thanks
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Severe problem commit_and_inc: VirtualAlloc failed

    just got this workin.
    Image Analysis Development Framework Using Qt (IADFUQ)

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.