From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Hansen Subject: Re: [RFCv2][PATCH] flexible array implementation Date: Wed, 22 Jul 2009 14:51:04 -0700 Message-ID: <1248299464.24021.334.camel@nimitz> References: <20090721220017.60A219D3@kernel> <2f86c2480907221357j5a09fd9au890f815db3750187@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <2f86c2480907221357j5a09fd9au890f815db3750187-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Benjamin Blum Cc: vda.linux-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org List-Id: containers.vger.kernel.org On Wed, 2009-07-22 at 13:57 -0700, Benjamin Blum wrote: > Does the array automatically grow if you give it more elements than > you tell it it can have? The only limits it has or enforces are the structural and architectural ones dictated by the layout. > How about a resize() function that can be > used to either grow or shrink the array? I think growing is out of the question. It has a fixed maximum size already. As for shrinking, there's probably a use case for when something is large, then shrinks back down. But, I think I'd want to see a user for it, otherwise I'm just guessing at it too much. -- Dave From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754252AbZGVVzm (ORCPT ); Wed, 22 Jul 2009 17:55:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754095AbZGVVzl (ORCPT ); Wed, 22 Jul 2009 17:55:41 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:51137 "EHLO e39.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754006AbZGVVzl (ORCPT ); Wed, 22 Jul 2009 17:55:41 -0400 Subject: Re: [RFCv2][PATCH] flexible array implementation From: Dave Hansen To: Benjamin Blum Cc: akpm@linux-foundation.org, containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, menage@google.com, vda.linux@googlemail.com, mikew@google.com In-Reply-To: <2f86c2480907221357j5a09fd9au890f815db3750187@mail.gmail.com> References: <20090721220017.60A219D3@kernel> <2f86c2480907221357j5a09fd9au890f815db3750187@mail.gmail.com> Content-Type: text/plain Date: Wed, 22 Jul 2009 14:51:04 -0700 Message-Id: <1248299464.24021.334.camel@nimitz> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2009-07-22 at 13:57 -0700, Benjamin Blum wrote: > Does the array automatically grow if you give it more elements than > you tell it it can have? The only limits it has or enforces are the structural and architectural ones dictated by the layout. > How about a resize() function that can be > used to either grow or shrink the array? I think growing is out of the question. It has a fixed maximum size already. As for shrinking, there's probably a use case for when something is large, then shrinks back down. But, I think I'd want to see a user for it, otherwise I'm just guessing at it too much. -- Dave