| Steven's profileLunatic ExperimentsPhotosBlogLists | Help |
|
June 23 Virtual Memory Management In .NET The hit counter for my blog has just the 10,000 hit milestone today. I had planed to release a comedic themed encryption library for Powershell that shows how some of the functions of GPG can be imitated in Powershell. However, I have not yet finished that library. Instead, I have decided I would release a virtual memory management library I wrote in C#. One of the projects I'm working on right now required a better understanding of the CPU architectures used today. This inevitably lead me to want to be able to use ASM in C# code. So I decided to start studying NASM and ASM in general, and then found that the .NET heap has execution protection. I then found that I can control the protection bits by calling the virtual memory management functions in the kernel32.dll library. This library is a .NET wrapper for those functions. The library is documented, but I don't have any example uses that I can release at this time. While I don't have any examples to release today I can say that this library is useful for executing either precompiled or dynamically generated native code. The library is released under the GNU General Public License. VirtualMemory.7z On the topic of ASM: I have read a few negative comments in the past about how well the .NET Framework is able to optimize the native code result of an assembly, particularly in the use of SIMD instructions. I feel I should comment on my experience while developing this library. I tested the execution time of two algorithms written in both NASM and C#. The execution time of the first algorithm I tested was ~10 times faster in NASM than what I got from the C# version. On the other hand, the execution time of the second algorithm I tested was only ~10% faster in NASM than in C#, and only after a couple hours of work to optimize the NASM code. According to my calculations, the speed result of the second algorithm in C# came very close the theoretical limit of my CPUs capacity, close enough that there would be no way to achieve that speed without the use of wide SIMD instructions. This indicates to me that the JITter in .NET Framework is capable of using SIMD instructions properly, while the same JITter may not always understand the algorithm being JITted. This is actually completely inline of my expectations for any compiler. June 10 "Detainee Photographic Records Protection Act of 2009" I just found something that has reminded me that the U.S.A. is not a democracy. I just discovered that section 1305 of H.R.2346 has the explicit purpose of allowing the Secretary of Defense the unrestricted right to prevent the publication of any photograph taken by US Armed Forces "relating to the treatment of individuals engaged, captured, or detained after September 11, 2001," and this right can not be circumvented by the Freedom of Information Act. From what I can see, section 1305 was removed from the bill by the House of Representatives, however, passed by the Senate. It is argued that the events of September 11, 2001 occurred because of an anti-American mentality. It is clear by the date used that the bill is designed to censor evidence of wrong doing by Bush Administration. Condoning actions made by a previous administration that would reflect negatively against the U.S.A. can only perpetuate this anti-American mentality. I can only suspect that anyone that attempts to prevent the publication of the evidence of any act condones the act represented by the evidence. In summery, I can not see how section 1305 of H.R.2346 could benefit the U.S.A. so I am explicitly stating my dissent to this bill. I hope that anyone with the power to stop ratification of section 1305 does so, and that whoever wrote it is removed from D.C. I am including a copy of section 1305 for your information.
June 01 Google Wave This is a must see. http://wave.google.com/ This is the best collaborative software that I have seen. The best thing is that it will be free to use and organizations will have the ability to set up their own private wave servers. I am very exited about this and, as you might already suspect, I do have plans for this once it moves into the public. |
|
|