From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server-vie001.gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_DBL_BLOCKED_OPENDNS, URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=new2025; t=1757692169; bh=Sokj6vuo1GFN8mKRA11PBFyLW1Ay87gSk8H+dNi9bjk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To:X-Gw-Outgoing-Server-Hash:X-Gw-Message-ID: X-Gw-PM-Hash:Message-ID:Date:From:Reply-To:Subject:To:Cc: In-Reply-To:References:Resent-Date:Resent-From:Resent-To:Resent-Cc: User-Agent:Content-Type:Content-Transfer-Encoding; b=hzXmXA/uPLX3vgf5zLtGoYiGzisstImy2SYAj155dGh6F51720J0BJJn/2GjtArH2 TtjmBU1mqXiUjJGOAobA3aBah1lhkUMeH2xyQcxGY1geuLQPyrw2ATeJkUsrGot30G rAJ4VTYRtYSf0wopPx0Ik1d9B0tYw0ZUYQXmpuu13cTCPUA7OnoIR/wudcicOKKrNs rlj4rB/HV6ckUdutKjoqEwj8CkWsQN7RuW44YRYUkgnnzEfm97n3M6diBacaYh7edq 5Jhoju9wMOxf342YDXsMuybHbLDtM5RH/l97odoXv2W80wyNuK2jQdONkzpaCQQv0j yBb44eOLVY5hQ== Received: from linux.gnuweeb.org (unknown [182.253.126.215]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id 987DC31279DB; Fri, 12 Sep 2025 15:49:27 +0000 (UTC) Date: Fri, 12 Sep 2025 22:49:21 +0700 From: Ammar Faizi To: Alviro Iskandar Setiawan Cc: Ahmad Gani , GNU/Weeb Mailing List Subject: Re: [PATCH gwproxy v10 2/2] gwproxy: refactor code base to add experimental raw DNS backend Message-ID: <20250912154921.GA3885112-ammarfaizi2@gnuweeb.org> References: <20250910104326.580778-1-reyuki@gnuweeb.org> <20250910104326.580778-3-reyuki@gnuweeb.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Gw-Outgoing-Server-Hash: 01afd303c8b96d0c1d5e80aa96a4ee40ec69888f786fa24107c0862c0644af79 X-Gw-Message-ID: f2fa31bba81b459ee5e049fa77cd5855f89431a29bcf77b5ec3a72ea176ee87e X-Gw-PM-Hash: 02dd3245fa5dea3a86252ee66f211fa4021b7a56629afcdabc1a5534636fa46e List-Id: On Fri, Sep 12, 2025 at 09:39:36PM +0700, Alviro Iskandar Setiawan wrote: > It'll complicate the reallocation much, as you have to memmove() > around the values yourself. In fact, realloc() may return the same > pointer if it internally doesn't need to expand, or may even use > mremap() in case the memory was directly allocated via mmap() to > expand it without the need to call memmove(). Ditto. Not only the memmove() will complicate thing, but also the size and alignment differences will do too. Note that ->sess_map and ->stack.arr are not the same type. -- Ammar Faizi