Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 33503 invoked from network); 21 May 2008 12:11:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 May 2008 12:11:24 -0000 Received: (qmail 39475 invoked by uid 500); 21 May 2008 12:11:25 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 39371 invoked by uid 500); 21 May 2008 12:11:25 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 39362 invoked by uid 99); 21 May 2008 12:11:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2008 05:11:25 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2008 12:10:40 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 615452388A04; Wed, 21 May 2008 05:11:01 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r658644 - /harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hymem.c Date: Wed, 21 May 2008 12:11:01 -0000 To: commits@harmony.apache.org From: odeakin@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080521121101.615452388A04@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: odeakin Date: Wed May 21 05:11:00 2008 New Revision: 658644 URL: http://svn.apache.org/viewvc?rev=658644&view=rev Log: Ensure we get 31bit pointers on z/OS s390. Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hymem.c Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hymem.c URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hymem.c?rev=658644&r1=658643&r2=658644&view=diff ============================================================================== --- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hymem.c (original) +++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hymem.c Wed May 21 05:11:00 2008 @@ -71,6 +71,9 @@ "\nallocate of %u bytes (new total is %u bytes)\n", byteAmount, DEBUG_TOTAL_ALLOCATED_MEMORY); mem = (void *) malloc (byteAmount + sizeof (UDATA)); +#if defined(HYS390) + mem = (void *) (((UDATA) mem) & 0x7FFFFFFF); +#endif /* HYS390 */ *((UDATA *) mem) = byteAmount; pointer = ((UDATA) mem + sizeof (UDATA)); #else @@ -78,7 +81,11 @@ { /* prevent malloc from failing causing allocate to return null */ byteAmount = 1; } + pointer = malloc (byteAmount); +#if defined(HYS390) + pointer = (void *) (((UDATA) pointer) & 0x7FFFFFFF); +#endif /* HYS390 */ #endif @@ -141,6 +148,9 @@ Trc_PRT_mem_hymem_reallocate_memory_Entry (memoryPointer, byteAmount); ptr = realloc (memoryPointer, byteAmount); +#if defined(HYS390) + ptr = (void *) (((UDATA) ptr) & 0x7FFFFFFF); +#endif Trc_PRT_mem_hymem_reallocate_memory_Exit (ptr); return ptr;