From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============6831475081606892503==" MIME-Version: 1.0 From: Walker, Benjamin Subject: Re: [SPDK] spdk_malloc vs. malloc Date: Thu, 03 May 2018 19:21:29 +0000 Message-ID: <1525375288.22849.48.camel@intel.com> In-Reply-To: 6D86871B-6059-45D8-9E06-C12A059E8A2A@netapp.com List-ID: To: spdk@lists.01.org --===============6831475081606892503== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Thu, 2018-05-03 at 18:23 +0000, Meneghini, John wrote: > > If the user passes flags =3D=3D 0 to the new spdk_malloc() call, this = could be > implemented by malloc() or equivalent behind the scenes, > = > So, does this mean you=E2=80=99re willing to change all calls to malloc(s= ize) with > spdk_malloc(size, 0, NULL, SPDK_ENV_SOCKET_ID_ANY, SPDK_MALLOC_SHARE)? > = > Is that the plan? > = Hi John, = SPDK explicitly depends on POSIX throughout the code base. We do have an environment abstraction layer designed to make porting SPDK to various environments (i.e. away from DPDK) easier, but this only abstracts operatio= ns that are not available through standard POSIX calls. We're concerned that f= ully abstracting POSIX would introduce a significant barrier to entry for new contributors to the project, while only enabling one additional use case th= at we're aware of. I understand that this one use case happens to be yours, an= d so this is a challenge for you. = In your code today, I assume you carry patches to replace the POSIX calls w= ith your available alternatives. We've attempted to make carrying these patches reasonably easy by moving all of the POSIX includes into a single header (include/stdinc.h). Since you're already carrying those patches, can you si= mply choose a different name for your replacement for malloc/calloc? Thanks, Ben --===============6831475081606892503==--