From user-return-343-apmail-stdcxx-user-archive=stdcxx.apache.org@stdcxx.apache.org Sun Jan 1 17:23:56 2012 Return-Path: X-Original-To: apmail-stdcxx-user-archive@www.apache.org Delivered-To: apmail-stdcxx-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 505119379 for ; Sun, 1 Jan 2012 17:23:56 +0000 (UTC) Received: (qmail 6305 invoked by uid 500); 1 Jan 2012 17:23:56 -0000 Delivered-To: apmail-stdcxx-user-archive@stdcxx.apache.org Received: (qmail 6253 invoked by uid 500); 1 Jan 2012 17:23:55 -0000 Mailing-List: contact user-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@stdcxx.apache.org Delivered-To: mailing list user@stdcxx.apache.org Received: (qmail 6245 invoked by uid 99); 1 Jan 2012 17:23:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Jan 2012 17:23:55 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of msebor@gmail.com designates 209.85.210.182 as permitted sender) Received: from [209.85.210.182] (HELO mail-iy0-f182.google.com) (209.85.210.182) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Jan 2012 17:23:47 +0000 Received: by iadj38 with SMTP id j38so28791805iad.41 for ; Sun, 01 Jan 2012 09:23:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=pW4J1Vq0WfkK74icfDEDSBqXlAycOAqjNdBv9zH3xeY=; b=sVoavKm94ZYmLOFu+QsTdButM1FSh//8vj+90GxtSt7pJlFGJ96KXihvIh0oRLo8f1 +XVUTsdqeyEIhSQFLSz+RXHp2zQVWYm6Gv9aN2Nykf912co4SrwVIJ3+e0KLJv7Epecg bckmihf57eRZL1VmpF+MAOgFGOVXrGnZ5WzmM= Received: by 10.50.161.135 with SMTP id xs7mr49382684igb.15.1325438607089; Sun, 01 Jan 2012 09:23:27 -0800 (PST) Received: from [192.168.1.104] (c-67-177-207-162.hsd1.co.comcast.net. [67.177.207.162]) by mx.google.com with ESMTPS id j3sm154523060ibj.1.2012.01.01.09.23.25 (version=SSLv3 cipher=OTHER); Sun, 01 Jan 2012 09:23:26 -0800 (PST) Message-ID: <4F00968C.6070505@gmail.com> Date: Sun, 01 Jan 2012 10:23:24 -0700 From: Martin Sebor User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15 MIME-Version: 1.0 To: user@stdcxx.apache.org CC: Azrael <41364069@qq.com> Subject: Re: Can I use stdcxx4.2.1 containers on share memory? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 12/31/2011 10:49 PM, Azrael wrote: > Hi , I am now searching for a stl implementation who's containers can work perfectly with alternative pointers define in the allocator given. > Because I want to make my program able to attatch to a block of share memory and continue it's previous work. The GCC default implementation use standard pointer in the container base, such as rb_tree_node_base etc. > And I found that stdcxx4.2.1 use the alloc::pointer instead. So ,I wonder if I can safely use stdcxx4.2.1 on share memory by simply define my own shm_allocator and shm_handle(pointer type recording the offset in share memory). > Actually, I am implementing a game server, so ,I require really good performace. > So, is stdcxx4.2.1 suitable for me? > > Really need help.....wait for response. IIRC, we successfully tested all contains with shared memory allocators except for std::list. The problem with list was getting its pointers to work correctly as user-defined types. I was hoping to find a test we used to exercise them in the test suite but so far I don't see it. Martin