Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
10 crawler(s) on-line.
 116 guest(s) on-line.
 1 member(s) on-line.


 OneTimer1

You are an anonymous user.
Register Now!
 OneTimer1:  13 secs ago
 BigD:  41 mins ago
 OlafS25:  43 mins ago
 kolla:  1 hr 2 mins ago
 amigakit:  1 hr 11 mins ago
 NutsAboutAmiga:  1 hr 14 mins ago
 Gunnar:  1 hr 52 mins ago
 Frank:  1 hr 59 mins ago
 MickJT:  2 hrs 38 mins ago
 A1200:  3 hrs 1 min ago

/  Forum Index
   /  Amiga OS4 Software
      /  Funny programming oddity
Register To Post

PosterThread
thinkchip 
Funny programming oddity
Posted on 2-Feb-2020 15:25:11
#1 ]
Super Member
Joined: 26-Mar-2004
Posts: 1183
From: Salt Lake City, Utah, USA

I'm doing some programming on a Civ-like game. This is just something funny that happened. When running the program it failed to initialize a class and the pointer was uninitialized. It would be garbage. When I displayed the pointer, the eight-character number looked like this: 0xdeadbeef. I swear it spelled out "dead beef". It was sort of creepy, like a message from the other side. What's the chances of a random hex number spelling that out?

Last edited by thinkchip on 02-Feb-2020 at 03:33 PM.

_________________
X5000 / microA1(OS4.1 FE U2) / CodeBench / Imagine / Blender
Lightwave 2019 / Microsoft Visual C++

 Status: Offline
Profile     Report this post  
MEGA_RJ_MICAL 
Re: Funny programming oddity
Posted on 2-Feb-2020 15:32:43
#2 ]
Super Member
Joined: 13-Dec-2019
Posts: 1200
From: AMIGAWORLD.NET WAS ORIGINALLY FOUNDED BY DAVID DOYLE

@thinkchip

Friend thinkchip,
it is not a coincidence.

Oh so many programs fill newly allocated memory with 0xdeadbeef.
https://www.c-sharpcorner.com/interview-question/what-is-deadbeef
https://www.definitions.net/definition/DEADBEEF

Every day something new to learn,
with your dearest friend, mentor, companion and master of memory allocations
MEGA_RJ_MICAL






Last edited!
Last edited!!!!

Last edited by MEGA_RJ_MICAL on 02-Feb-2020 at 03:34 PM.

_________________
I HAVE ABS OF STEEL
--
CAN YOU SEE ME? CAN YOU HEAR ME? OK FOR WORK

 Status: Offline
Profile     Report this post  
Derfs 
Re: Funny programming oddity
Posted on 2-Feb-2020 17:44:51
#3 ]
Cult Member
Joined: 8-Mar-2003
Posts: 787
From: me To: you

@thinkchip

https://wiki.amigaos.net/wiki/Debug_Kernel

_________________

 Status: Offline
Profile     Report this post  
OneTimer1 
Re: Funny programming oddity
Posted on 2-Feb-2020 17:53:53
#4 ]
Cult Member
Joined: 3-Aug-2015
Posts: 962
From: Unknown

@thinkchip

Quote:

thinkchip wrote:

the eight-character number looked like this: 0xdeadbeef. I swear it spelled out "dead beef". ...


System programmers often filled unused memory with some kind of marker.

If the memory was untouched it would contain this marker, with this trick they could identify memory access to regions that where used accidentally without an MMU.

see also:
https://en.wikipedia.org/wiki/Hexspeak

 Status: Online!
Profile     Report this post  
kas1e 
Re: Funny programming oddity
Posted on 2-Feb-2020 18:05:24
#5 ]
Elite Member
Joined: 11-Jan-2004
Posts: 3549
From: Russia

@thinkchip
As Derfs point out on debug_kernel article on wiki:

If the value is 0xDEADBEEF or 0xFEFEBEEF then you have accessed some memory after it has been freed;

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites

 Status: Offline
Profile     Report this post  
TiredofLife 
Re: Funny programming oddity
Posted on 2-Feb-2020 23:54:57
#6 ]
Super Member
Joined: 6-Jul-2005
Posts: 1702
From: Here

@thinkchip

It's not random, it's a message from beyond telling you that you should drop an old grudge.

Cheers

_________________
If your nose runs and your feet smell, you're upside down.

 Status: Offline
Profile     Report this post  
ggw 
Re: Funny programming oddity
Posted on 3-Feb-2020 2:29:57
#7 ]
Super Member
Joined: 24-May-2003
Posts: 1106
From: Austin, TX

@thinkchip

That was the biggest laugh I had all day!
I've been a professional programmer since1968 starting in assembly language and since then just about every thing you could imagine and THAT ... I had never run into.

Thanks!

_________________
..effects of civilization upon...nature, the growing gap between what education was supposed to accomplish and what it consisted of, the national debt and...high taxes, the problem of the excess cost of medical care -- Philip Wylie, 1951

 Status: Offline
Profile     Report this post  
MEGA_RJ_MICAL 
Re: Funny programming oddity
Posted on 3-Feb-2020 4:06:57
#8 ]
Super Member
Joined: 13-Dec-2019
Posts: 1200
From: AMIGAWORLD.NET WAS ORIGINALLY FOUNDED BY DAVID DOYLE

@ggw

Quote:

ggw wrote:
@thinkchip

That was the biggest laugh I had all day!
I've been a professional programmer since1968 starting in assembly language and since then just about every thing you could imagine and THAT ... I had never run into.

Thanks!



That is very surprising, friend ggw!

Borland compilers had DEADBEEF all over the place. Watcom C++ had BAADF00D. Microsoft Visual Basic DOS (yes VB Dos nonetheless) had DEADDEAD.

There used to be a nice article here http://www.thefullwiki.org/0xDEADBEEF but it's currently unreachable. The website is probably maintained by AEON or Hyperion.


VVVVVVVVVVVVOOOOOOOOOOOOOOOOOOOOOOOORRRRRRRRRRRRRRRR



MEGA_RJ_MICAL
Software Architect Extraordinaire,
Custodian of Amigaworld.net,
International Secret Agent

Last edited by MEGA_RJ_MICAL on 03-Feb-2020 at 04:07 AM.

_________________
I HAVE ABS OF STEEL
--
CAN YOU SEE ME? CAN YOU HEAR ME? OK FOR WORK

 Status: Offline
Profile     Report this post  
Hypex 
Re: Funny programming oddity
Posted on 3-Feb-2020 12:54:54
#9 ]
Elite Member
Joined: 6-May-2007
Posts: 11180
From: Greensborough, Australia

@MEGA_RJ_MICAL

Quote:
There used to be a nice article here http://www.thefullwiki.org/0xDEADBEEF but it's currently unreachable. The website is probably maintained by AEON or Hyperion.




What's also amusing is this attempt at Amiga humour on site.

Guru Meditation:

XID: 1359558325

Last edited by Hypex on 03-Feb-2020 at 12:55 PM.

 Status: Offline
Profile     Report this post  
nbache 
Re: Funny programming oddity
Posted on 3-Feb-2020 22:07:42
#10 ]
Super Member
Joined: 8-Apr-2003
Posts: 1034
From: Copenhagen, Denmark

@Hypex

You can "blame" that one on Poul Henning Kamp, the programmer behind the Varnish web cache/HTTP accelerator.

He has a soft spot for Amiga and in general computer history.

Best regards,

Niels

 Status: Offline
Profile     Report this post  
Hypex 
Re: Funny programming oddity
Posted on 4-Feb-2020 15:19:53
#11 ]
Elite Member
Joined: 6-May-2007
Posts: 11180
From: Greensborough, Australia

@nbache

Nice one. Like the "polish" on that.

 Status: Offline
Profile     Report this post  

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle