tag:blogger.com,1999:blog-1720439865889190419.post8191129321921877512..comments2023-03-25T13:51:50.278+01:00Comments on C Spangled: Safe memory usage in C# part 2/2Alberthttp://www.blogger.com/profile/15599692262672037932noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-1720439865889190419.post-89775665820233588982010-07-25T06:09:38.212+02:002010-07-25T06:09:38.212+02:00Did you really use underscores to align your equal...Did you really use underscores to align your equal signs? All of this is atrocious. It has to be a joke.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1720439865889190419.post-20893715928343074872010-07-07T20:39:03.035+02:002010-07-07T20:39:03.035+02:00I really hope this is a joke:
if (i > int.MaxV...I really hope this is a joke:<br /><br />if (i > int.MaxValue) throw new OverflowException("int too big!");Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1720439865889190419.post-50647421697078317172010-07-07T17:10:15.325+02:002010-07-07T17:10:15.325+02:00If you don't know something as simple as how t...If you don't know something as simple as how to implement a Turing machine, you probably shouldn't be writing a heap allocator. This has to be one of the most misguided expeditions I've seen in a long time.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1720439865889190419.post-19354280178145809612010-07-06T23:46:02.526+02:002010-07-06T23:46:02.526+02:00Emulating C memory management for mission-critical...Emulating C memory management for mission-critical apps, that was amusing. But this:<br /><br />"While I don't know exactly the algorithm for Turing's machine, I think the LinearMemory is well suited to encryption in general"<br /><br />HAHAHAH! You sir are a practical joker of top rank.Jeonoreply@blogger.comtag:blogger.com,1999:blog-1720439865889190419.post-87516586652469798932010-05-04T15:15:33.424+02:002010-05-04T15:15:33.424+02:00@chris: Yes it is. A better idea, however, would ...@chris: Yes it is. A better idea, however, would be to add reference counting and some ReferenceInc() and ReferenceDec() methods. ReferenceDec() would then do the work of Destroy() when the reference crosses 0. This way we get automatic garbage collection for free. :)Alberthttps://www.blogger.com/profile/15599692262672037932noreply@blogger.comtag:blogger.com,1999:blog-1720439865889190419.post-7370760997393785552010-05-04T10:42:18.377+02:002010-05-04T10:42:18.377+02:00Nice, but I think you forgot a static method on th...Nice, but I think you forgot a static method on the classes which deallocates the indicated object on the big byte array -- a Destroy(int ptr) to balance the Create(..).Chrisnoreply@blogger.comtag:blogger.com,1999:blog-1720439865889190419.post-52389295305315179632010-04-27T10:17:02.380+02:002010-04-27T10:17:02.380+02:00Anonymous #2:
Thanks. :) Turing is truly one of ...Anonymous #2:<br /><br />Thanks. :) Turing is truly one of the greatest heroes of WWII. As I recall, his Turing Machine was instrumental in breaking the German ENIGMA encryption and turning the war around.<br /><br />While I don't know exactly the algorithm for Turing's machine, I think the LinearMemory is well suited to encryption in general, sice you have free access directly to the bytes. You could even encrypt and decrypt an object in-place!Alberthttps://www.blogger.com/profile/15599692262672037932noreply@blogger.comtag:blogger.com,1999:blog-1720439865889190419.post-2586236386523746052010-04-26T14:40:05.455+02:002010-04-26T14:40:05.455+02:00I like the memory viewer very good. Nice, professi...I like the memory viewer very good. Nice, professional. I think that says it all.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1720439865889190419.post-11962113050169987002010-04-26T12:24:10.334+02:002010-04-26T12:24:10.334+02:00this is quite breath teaking, you are essentially ...this is quite breath teaking, you are essentially going back to the roots of programming and we can see how powerful it is. i i was reading on wikipedia about turing machine and correct me if im wrong but this looks like it the same deal, its really about some big array where you move around symbols, just with minor differences.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1720439865889190419.post-70966402790768748832010-04-26T12:23:59.822+02:002010-04-26T12:23:59.822+02:00It's like you're patting yourself on the b...It's like you're patting yourself on the back for discovering that lead paint tastes delicious.Anonymousnoreply@blogger.com