Results 1 to 3 of 3

Thread: shared memory wont attach

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: shared memory wont attach

    Can you check if the following line succeeded?

    Qt Code:
    1. numofallplayers.create(sizeof(qint64), QSharedMemory::ReadWrite);
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    May 2010
    Location
    slovakia
    Posts
    47
    Thanks
    10
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Maemo/MeeGo

    Default Re: shared memory wont attach

    problem wasn't in shared memory, but in a threading I'm using... so now I know I have to call sharedmemory.create in beginning of every thread, so i make sure it's created before any thread attach it... and in threading you never know which thread will be first

Similar Threads

  1. Does Qt support shared memory ?
    By Shawn in forum Qt Programming
    Replies: 11
    Last Post: 3rd November 2009, 17:07
  2. QT shared memory
    By sweetsubha2020 in forum Qt Programming
    Replies: 2
    Last Post: 18th January 2009, 05:30
  3. Replies: 4
    Last Post: 29th December 2008, 19:50
  4. MySQL and shared-memory connection
    By patrikd in forum Qt Programming
    Replies: 1
    Last Post: 1st August 2008, 16:53
  5. How to clear shared memory?
    By THRESHE in forum Qt Programming
    Replies: 4
    Last Post: 22nd May 2008, 18:28

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.