From owner-freebsd-questions Wed Sep 8 11:14:41 1999 Delivered-To: freebsd-questions@freebsd.org Received: from sand2.global.net.uk (sand2.global.net.uk [195.147.246.100]) by hub.freebsd.org (Postfix) with ESMTP id E65051571F for ; Wed, 8 Sep 1999 11:14:20 -0700 (PDT) (envelope-from mark@globalnet.co.uk) Received: from pa2s08a07.client.global.net.uk ([195.147.232.163] helo=marder-1.) by sand2.global.net.uk with esmtp (Exim 2.05 #1) id 11OmDm-0005k4-00 for questions@freebsd.org; Wed, 8 Sep 1999 19:13:26 +0100 Received: (from mark@localhost) by marder-1. (8.9.2/8.8.8) id TAA03470 for questions@freebsd.org; Wed, 8 Sep 1999 19:04:51 +0100 (BST) (envelope-from mark) Date: Wed, 8 Sep 1999 19:04:50 +0100 From: Mark Ovens To: questions@freebsd.org Subject: Two versions of malloc()? Message-ID: <19990908190450.C283@marder-1> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i Organization: Total lack of Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Looking at some kernel source I found malloc() called with 3 args. A search revaled this in /usr/include/sys/malloc.h: void *malloc __P((unsigned long size, struct malloc_type *type, int flags)); but the manpage, and all versions of malloc I've seen, are simply: void *malloc __P((size_t)); This is how it's declared in /usr/include/stdlib.h. What is the difference and why does the kernel use the former? -- STATE-OF-THE-ART: Any computer you can't afford. OBSOLETE: Any computer you own. ________________________________________________________________ FreeBSD - The Power To Serve http://www.freebsd.org My Webpage http://ukug.uk.freebsd.org/~mark/ mailto:mark@ukug.uk.freebsd.org http://www.radan.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message