Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 70963 invoked from network); 15 Jul 2006 01:01:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Jul 2006 01:01:48 -0000 Received: (qmail 43966 invoked by uid 500); 15 Jul 2006 01:01:48 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 43959 invoked by uid 500); 15 Jul 2006 01:01:48 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 43948 invoked by uid 99); 15 Jul 2006 01:01:48 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Jul 2006 18:01:48 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [208.30.140.160] (HELO moroha.quovadx.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Jul 2006 18:01:47 -0700 Received: from qxvcexch01.ad.quovadx.com (qxvcexch01.ad.quovadx.com [192.168.170.59]) by moroha.quovadx.com (8.13.6/8.13.4) with ESMTP id k6F10r1g016663 for ; Sat, 15 Jul 2006 01:00:53 GMT Received: from [10.70.3.113] ([10.70.3.113]) by qxvcexch01.ad.quovadx.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 14 Jul 2006 19:01:28 -0600 Message-ID: <44B83E82.9050606@roguewave.com> Date: Fri, 14 Jul 2006 19:01:54 -0600 From: Martin Sebor Organization: Rogue Wave Software User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 X-Accept-Language: en-us, en MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: svn commit: r421918 - in /incubator/stdcxx/trunk/tests: include/rw_alloc.h src/alloc.cpp References: <20060714145435.F3A8B1A981A@eris.apache.org> In-Reply-To: <20060714145435.F3A8B1A981A@eris.apache.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 15 Jul 2006 01:01:28.0296 (UTC) FILETIME=[33DBCE80:01C6A7AA] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N antonp@apache.org wrote: > Author: antonp > Date: Fri Jul 14 07:54:34 2006 > New Revision: 421918 > > URL: http://svn.apache.org/viewvc?rev=421918&view=rev A few more comments: The (still unwritten) naming convention for names of symbols private to the driver (i.e., symbols not to be used outside the driver, regardless of their linkage) calls for an "_rw_" prefix (e.g., _rw_translate_prot). This applies to functions as well as variables except for the Win32 POSIX compatibility layer, i.e., except for functions like mmap() et al). I changed most of the names in my last commit: http://svn.apache.org/viewvc?rev=422071&view=rev so it's something to keep in mind in the future. Instead of _rw_binary_search/_rw_lower_bound, would it be possible to use the standard C function bsearch()? The error handling in the file isn't very robust: we shouldn't just assert that the system calls succeeded; we should print out an error message and either exit with a non-zero exit status or return a value indicating a failure (if possible). If the former, the mechanism to use is rw_error() and/or rw_fatal(). The %m and %{#m} directives let you format the text of the error message corresponding to the value of errno and the name of the EXXX variable, respectively. Finally, I'm not sure I understand the purpose of the MemRWGuard class. The ctor sets one kind of permissions on a page of memory and the dtor sets another. Some functions do things in between the invocations of the two, others don't. It's not clear to me whether all invocations of the ctor and dtor really need the dtor to run or not. In other words, it's not clear to me that plain old functions wouldn't be more appropriate. Can you shed some light on this? Thanks Martin