From: Fabio Tordini Subject: libnuma - data types problems Date: Mon, 07 Jan 2013 11:46:36 +0100 Message-ID: <50EAA78C.3040307@di.unito.it> References: <50EA9D7D.7090906@di.unito.it> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=di.unito.it; s=dipinfo2011; t=1357555599; bh=EvXsuqnhFn+echq8X6pOjf0IDiHCCQNNEuVfs1s4MSs=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=HZLF/+E2j6c0EJ+LCMHoSg0issik+V2sUdN+1a14g7dpktW/pSmRDkX7n3GFRNTZB mtZ381Hn+f8m+k8oPFoGXERWSdlYxCR+d7smoiS6TefLZmrKEDkzoHVAcuO5SRygsR FYc+XkOZCCUn0UQ+R9Y1STmg5C+gS2uw+aKaaxIg= In-Reply-To: <50EA9D7D.7090906@di.unito.it> Sender: linux-numa-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: linux-numa@vger.kernel.org Hello, I'm using libnuma for an enhanced NUMA-aware allocator. There are some functions which do not work as explained in the 'numa man page' or libnuma APIs. Precisely, I'm having problems with these functions: |numa_get_run_node_mask()| and |numa_node_to_cpus()|. Concerning the former, reading the API and the manual, it returns a |struct bitmask *|, while the compiler asks for a |nodemask_t|. The latter is supposed to require two parameters, as from API definition, but the compiler asks for three. If I pass three arguments as it asks - |(int node, unsigned long *buffer, int bufferlen) -| I get a /segfault/ every time, no matter the /bufferlen/ I use. Maybe I'm doing something wrong, but I can't see what, since I'm trivially following APIs directives. I wonder whether there are some discrepancies between APIs and source code that have changed through libnuma versions. (btw, how do I check which libnuma/numactl is running on the machine? I working remotely on a server and |numactl| doesn't seem to have a |--version| option!) Kind regards, -- Fabio Tordini PhD Candidate, Computer Science Department University of Torino - Italy