Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cB6Md-0003iZ-2t for pgsql-hackers@arkaria.postgresql.org; Sun, 27 Nov 2016 20:47:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cB6Mc-0004g5-4y for pgsql-hackers@arkaria.postgresql.org; Sun, 27 Nov 2016 20:47:54 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cB6MZ-0004fU-Pm for pgsql-hackers@postgresql.org; Sun, 27 Nov 2016 20:47:51 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cB6MS-000085-Nn for pgsql-hackers@postgresql.org; Sun, 27 Nov 2016 20:47:50 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 9D63F205DE; Sun, 27 Nov 2016 15:47:42 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Sun, 27 Nov 2016 15:47:42 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=lH6exS0+3P5GZa 3VnQR74w5aeps=; b=OHEipa40bh+U0PPnjdDkQlQqIad24WSY0WIYdgI+LNWFq9 SYmkdbdJgS9zx3DoTzeFy+ltCSGTmsNZbMCVQsfuRjhtSxOxclznmsejZ03tU20v LuYNOCf+OPlutYWdhffBvKGnATCf99gW8pX80dJUzp2El7RNqCt7ZfMIHNLig= X-ME-Sender: X-Sasl-enc: i5eR2Q0u/tyooDQEYF94Ts58QsIQAkWkTSQZBjpfOYk2 1480279662 Received: from intern.anarazel.de (unknown [199.87.86.247]) by mail.messagingengine.com (Postfix) with ESMTPA id 4EF497E697; Sun, 27 Nov 2016 15:47:42 -0500 (EST) Date: Sun, 27 Nov 2016 12:47:40 -0800 From: Andres Freund To: Tomas Vondra Cc: Petr Jelinek , Robert Haas , John Gorman , pgsql-hackers Subject: Re: PATCH: two slab-like memory allocators Message-ID: <20161127204740.dr3swudwsbafjuof@alap3.anarazel.de> References: <9818b54a-fcb6-f018-0b16-96d6a1d1da27@2ndquadrant.com> <34a6d4ea-7f3d-a62c-fff1-7a9108c078d7@2ndquadrant.com> <4f176a6c-c197-165d-dee4-5de8f279f1f4@2ndquadrant.com> <20161112191257.3a4n6kzegvu637qn@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Hi, > > +typedef struct SlabBlockData *SlabBlock; /* forward reference */ > > +typedef struct SlabChunkData *SlabChunk; > > > > Can we please not continue hiding pointers behind typedefs? It's a bad > > pattern, and that it's fairly widely used isn't a good excuse to > > introduce further usages of it. > > > > Why is it a bad pattern? It hides what is passed by reference, and what by value, and it makes it a guessing game whether you need -> or . since you don't know whether it's a pointer or the actual object. All to save a * in parameter and variable declaration?... Andres -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers