From owner-freebsd-arch@freebsd.org Fri Mar 10 19:12:12 2017 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 401B1D0677F for ; Fri, 10 Mar 2017 19:12:12 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x22c.google.com (mail-pf0-x22c.google.com [IPv6:2607:f8b0:400e:c00::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0BFED1975; Fri, 10 Mar 2017 19:12:12 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x22c.google.com with SMTP id j5so45132170pfb.2; Fri, 10 Mar 2017 11:12:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=wdxfw2Y6I3Z+D/o90sqk/CQe5B3CjPRGiSta8xYwUlY=; b=vhdfDG/M/h2zzNoNEG8UPENg9WcBKjWJ36R9f/UcBJ1i41PLx0e+QUkO61Bzgnr3Ng 3TSkBac7OqvYDx5RKT9ELRw5amiAjFTuE+Huhx99IJ6dd9CIMrMYeBroQ2M9HOL4Jpt2 SyUE0KDxf58SGILDUOqzlT+Z+stDErLGS1KofLDdvIRmiUzNUxyG0eBf90E6SCXWRwLU aHPbTM8fhKleWqDlp1Z8pEqzOKtc1P5rfRLvc387GFP4QHPtQvcbEvk8kCvGYWT9bEUu j/Bd3bRFwz2UCX7B8HtlyRvmyooDuoNQvEanhW88XT/H4zTrzMe5f2/1fzTQepzDPW8I op0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=wdxfw2Y6I3Z+D/o90sqk/CQe5B3CjPRGiSta8xYwUlY=; b=XqH0sMtgUoRuCSXTxX1RyrHezIPQVHO6LmmTEkQvyDuy9DJNhwRJxaA9nYErsX+b1E eqEetzu71RU9m96/4jLYtK4RhNYgERgAO/9+IFWsWPU6uIOGkfsh71bK/0h01uc9vVyH 2EviU0CSBr3vzYK0OgQ9ckS77/I3sxX718GF5HPxkgfJSRUqFEHLfSYVp1qw0KD4WSAO y5C+DfCgAHRXc6grot0+MNYMU9SR+lkWBu/OnZkfanbCG4TU9Q00Dxmr7I2mX//Qo1wD eyzj2MVp8IDNj0lRbcTZRpRYxvUsg+AkvuDeKzxTukT0hEkMWMEJhbjcdRyX70U9mru/ kEig== X-Gm-Message-State: AMke39k3tIjsKXVxUqGpG/5Fowi3I6UP6b75P8Gn7ln+fq/9G62di/K8RgqlXHbufBQu0A== X-Received: by 10.99.2.139 with SMTP id 133mr22043922pgc.168.1489173131365; Fri, 10 Mar 2017 11:12:11 -0800 (PST) Received: from ?IPv6:2607:fb90:824b:fdcc:bc73:8389:49de:29b7? ([2607:fb90:824b:fdcc:bc73:8389:49de:29b7]) by smtp.gmail.com with ESMTPSA id h14sm20259934pgn.41.2017.03.10.11.12.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Mar 2017 11:12:10 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: reallocarray(3) and its uses From: Ngie Cooper X-Mailer: iPhone Mail (14D27) In-Reply-To: <44f542e8-920f-c6bc-7eb0-2e4dab86a5eb@FreeBSD.org> Date: Fri, 10 Mar 2017 11:12:09 -0800 Cc: FreeBSD-arch list Content-Transfer-Encoding: quoted-printable Message-Id: References: <44f542e8-920f-c6bc-7eb0-2e4dab86a5eb@FreeBSD.org> To: Pedro Giffuni X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Mar 2017 19:12:12 -0000 > On Mar 10, 2017, at 09:00, Pedro Giffuni wrote: >=20 > Hello; >=20 > I wasn't a fan of bringing reallocarray(3) from OpenBSD, but since we have= it, I thought I'd take a look at using it. It is rather easy to use so I we= nt around opengrok'ing "realloc" in userland and crosschecking with OpenBSD a= nd I got to this patch: >=20 > https://reviews.freebsd.org/D9915 >=20 > Current reviewers are mute: I am unsure if they are just deeply impressed a= nd don't want to speak up or if they are simply too busy (most likely the la= ter). There are still more uses in some utilities but I wanted to see what p= eople think of the general idea. Hi Pedro! I'll take a look at the reviews sometime after I get back tomorrow night. My general thoughts are: if it's an application of library that needs to be p= ortable, don't use it. If not, use it. I think it's kind of the same class of API call as reallocf. reallocf is a g= ood extension, but it's not 100% portable. Thanks! -Ngie=