* [Linux-ia64] malloc problems
@ 2001-04-26 14:36 Donny Cooper
2001-04-26 17:00 ` Andreas Schwab
0 siblings, 1 reply; 2+ messages in thread
From: Donny Cooper @ 2001-04-26 14:36 UTC (permalink / raw)
To: linux-ia64
Hello,
3 SDV systems, we'll call them Tom, Dick, & Harry:
(2)BigSur
Tom (1 x B3, 1GB Mem)
Dick (2 x B3, 1GB Mem)
(1)Lion
Harry (4 x B3, 4GB Mem)
Problem:
When running the exact same executable, Dick and Harry, consistently give
the same results and Tom consistently gives different results.
Systems have been verified to be the same in many aspects:
OS environment
Kernel
BIOS/Firmware
CMOS settings
Mem type and board locations
SCSI and settings
Below is a small sample of code and the results I get on each system:
dynamic_area = (unsigned char *) malloc ( membytes );
printf(" dyn_area = %x %lx, mem= %x \n",dynamic_area,dynamic_area,membytes);
Result from Tom: (1-way BigSur)
dyn_area = 40000010 40000010, mem= 2000018
Result from Dick & Harry:(2-way BigSur & 4-way Lion)
dyn_area = 10 2000000000000010, mem= 2000018
Is it a single-CPU thing?
Any ideas are appreciated.
Thanks.
***************************************************************************
Donny Cooper | Direct Phone : (281) 465-1506
NEC Systems, Inc. | Houston Metro: (281) 296-0912 x 1506
High Performance Computing Center| Fax : (281) 465-1599
4200 Research Forest Dr, #400 | E-mail : dcooper@atcc.necsyl.com
The Woodlands, TX 77381 | URL : http://www.necservers.com
***************************************************************************
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Linux-ia64] malloc problems
2001-04-26 14:36 [Linux-ia64] malloc problems Donny Cooper
@ 2001-04-26 17:00 ` Andreas Schwab
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2001-04-26 17:00 UTC (permalink / raw)
To: linux-ia64
"Donny Cooper" <dcooper@hstc.necsyl.com> writes:
|> dynamic_area = (unsigned char *) malloc ( membytes );
|> printf(" dyn_area = %x %lx, mem= %x \n",dynamic_area,dynamic_area,membytes);
You are passing a pointer where an unsigned int and an unsigned long,
resp., is expected. That results in undefined behaviour.
Andreas.
--
Andreas Schwab "And now for something
SuSE Labs completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-04-26 17:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-26 14:36 [Linux-ia64] malloc problems Donny Cooper
2001-04-26 17:00 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox