[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Startup timing analysis
From:       Lubos Lunak <l.lunak () sh ! cvut ! cz>
Date:       2001-10-24 6:24:53
[Download RAW message or body]

Dne po 22. říjen 2001 15:23 Ellis Whitehead napsal(a):
> >  What kind of shared memory are you going to use, mmap or shmget? We
> > recently talked about shmget on IRC, and IIRC the conclusion was that
> > shmget sucks.
>
> I was planning on shmget, but not based on any experience.  Are you saying
> mmap would be better?

 Depending on the kind of the data, its size and how often it's created, you 
might also simply store the data in a root window property.

>
> It would be great if the shared memory area could contain a few working
> QMap<>s, but I can't think of how that could be done.  Do you know if it's
> possible?

 No, you can't put QMap in shared memory, as it allocates some more memory 
using operator new.  You can however use a sorted array with binary search 
instead, without a big performance difference for reasonable size of data. 
You can manage to do this even if the key is a string with variable length, I 
use it in the icon server I'm writing. I can mail you the code if you want.


-- 
 Lubos Lunak
 llunak@suse.cz ; l.lunak@kde.org
 http://dforce.sh.cvut.cz/~seli

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic