From owner-freebsd-current@FreeBSD.ORG Wed Jan 28 11:39:30 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0DE2106564A for ; Wed, 28 Jan 2009 11:39:30 +0000 (UTC) (envelope-from channa.kad@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.230]) by mx1.freebsd.org (Postfix) with ESMTP id BA27F8FC08 for ; Wed, 28 Jan 2009 11:39:30 +0000 (UTC) (envelope-from channa.kad@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so7022065rvf.43 for ; Wed, 28 Jan 2009 03:39:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=/xliuBc1YalWbBKIzMlb3grCP13kKVpPSAQQHWvWOzs=; b=XhJUPgLrdtj1t11fqm4RHVuv7FoAT5dU8F5v7P9iHynVo6hREQuFRiONtIZc5kQ3eX j+JicQH79KGh5trtJFQ9ZubQi9U1YGMvItTAYr5QdEXIfB5Cq5elC/OwxLlak4QHYCrv ZDxjNzdUKMCqldTn6YinEMmMIvOHio2NMf0wA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=b/v4DOxTluwgSnShF1KPHOUSzolRpyC6jX10a3LvbEpk8IAcbzpe6WQl8dE5vRAtyH I/cY0AqWZkNbbIKFMCQsIoo1t2BHKlJwLRVK6+ARuk0FRml9To8pv7+gzJAuWtRBsk45 1U4jACdDRNCWnCDDfULEBnTxrehrzn+0Y9ZHY= MIME-Version: 1.0 Received: by 10.141.197.21 with SMTP id z21mr860074rvp.9.1233142770272; Wed, 28 Jan 2009 03:39:30 -0800 (PST) Date: Wed, 28 Jan 2009 17:09:30 +0530 Message-ID: <515c64960901280339m17fa9309v2e1bc3f55454ab@mail.gmail.com> From: Channa To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Jemalloc SEGV for 1MB chunk X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2009 11:39:31 -0000 Hi All, I am using jemalloc.c source from FreeBSD-current source. When i allocate 1MB of memory using malloc() and use it as the below test shows #include #include #include int main() { int i; char *buf; size_t size = 1048576 ; buf = malloc(size); for (i = 0; i < 1048576; i++) buf[i] = 'a'; printf("The length of buff is : %d\n",strlen(buf)); free(buf); return 0; } When i try to call strlen(buf) SEGV is recived. This behaviour is seen when only for 1MB chunk if i allocate memory lesser than 1MB no issues noticed. Could anyone see similar problem? Is the above test wrong? Or some issue with huge memory allocation in jemalloc? Your response will be very helpful. Thanks & Regards, Channa