From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yh0-f48.google.com (mail-yh0-f48.google.com [209.85.213.48]) by dpdk.org (Postfix) with ESMTP id 51E6718F for ; Mon, 15 Dec 2014 15:29:12 +0100 (CET) Received: by mail-yh0-f48.google.com with SMTP id i57so5091800yha.7 for ; Mon, 15 Dec 2014 06:29:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=WqBYWS6g9pbqVHGgq7NA1kO+qafE+mKwwE9f+844/LI=; b=bR4pWqI1E+qEZDa08oz2eUVlvHFxOyfJRM0q02NgbMewM0Ev3aFBSjqqQrmT9m2h+n X6kWk3NVMNRe8sVH0xpwx01rWNBffJVfU/Eqk8JdtYNijCYkBXdL9wn/HTb9cBv9T6+L M5qVesW99d381u4aVKLWBYutg4XmKa9PJ7H+P+RitJ5HJzaH2Y0MViPMpYbPjXgUtq6k nXUnSb6RygBlGN29kn76GywJgMNveCNiQv4pFysmofElZmsUG34V+AJ5MU3AYz+9/lVB j1ebmc5gEifgTJYCp4BLsHpm3RkXDztDcuWKCOiCVwsAOqYwfCZtMOqOFkWz4H6uRTns 6d4A== X-Gm-Message-State: ALoCoQnksBet7MjMcoVlDqssa8cSgQJGOKAZuOQXbVgu8C/8ubV7rQeahzRPdtcng/JbxuZYs4Yz MIME-Version: 1.0 X-Received: by 10.236.228.101 with SMTP id e95mr22742916yhq.56.1418653750373; Mon, 15 Dec 2014 06:29:10 -0800 (PST) Received: by 10.170.54.78 with HTTP; Mon, 15 Dec 2014 06:29:10 -0800 (PST) In-Reply-To: References: Date: Mon, 15 Dec 2014 08:29:10 -0600 Message-ID: From: Jay Rolette To: "Wodkowski, PawelX" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: Dev Subject: Re: [dpdk-dev] [PATCH] replaced O(n^2) sort in sort_by_physaddr() with qsort() from standard library X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2014 14:29:12 -0000 FWIW, it surprised the heck out of me as well. Turns out that even though I'm compiling in 64-bit mode, gcc has sizeof(int) as 4 bytes rather than 8. Not really sure what the scoop is on that, but the standard leaves that up to the compiler. I'm used to int always being the "natural size" on the CPU/OS, so for a 64-bit executable on Intel, I assumed int would be 64-bit. Being an embedded developer for so many years, I rarely use semi-defined data types just to avoid these sorts of problems. On Mon, Dec 15, 2014 at 7:20 AM, Wodkowski, PawelX < pawelx.wodkowski@intel.com> wrote: > > > Because it doesn't work correctly :-) > > It should, what I am missing here? :P > > Pawel > >