使用脚本程序管理Windows网络 第四部分Win32-NetworkAdapterConfiguration – Windows网管 – TT网络 – TechTarget中国
http://www.searchnetworking.com.cn/ShowContent_14163.htm
ManagementObject 参数 WMI 部分参数(Win32_NetworkAdapterConfiguration)及示例 — Windows Live
http://cappucinolz.spaces.live.com/Blog/cns!27DDB6018F8DA3D1!1241.entry
ASP.NET获取IP与MAC[using C#]_隔山打牛
http://hi.baidu.com/upjoyce/blog/item/63639d18caa0bfb34bedbc39.html
使用脚本操作进程_C#技术交流
http://hi.baidu.com/paycom/blog/item/62c444089db37e950b7b8218.html
C#共享内存类 改进版_半天月·随笔 &line;&line; 拾遗
http://hi.baidu.com/bantianyue/blog/item/e97c8ed4aeacb406a18bb7a3.html
CodeProject: How to do CreateFileMapping in a C++ DLL and access it in C#, VB, C++ etc.. Free source code and programming help
http://www.codeproject.com/KB/winsdk/YetAnotherMMFSample.aspx
CodeProject: A C# Framework for Interprocess Synchronization and Communication. Free source code and programming help
http://www.codeproject.com/KB/threads/csthreadmsg.aspx
CodeProject: Using Memory Mapped Files in ASP.NET using VB.NET. Free source code and programming help
http://www.codeproject.com/KB/aspnet/VbNetMemoryMappedCache.aspx
pinvoke.net: CreateFileMapping (kernel32)
http://www.pinvoke.net/default.aspx/kernel32/CreateFileMapping.html
A .NET Memory-Mapped File Cache Infrastructure
http://www.eggheadcafe.com/articles/20050116.asp
c#操作内存数据,共享内存操作类(C#源码)
http://72.14.235.132/u/loyolachicago?q=cache:9IUf9G7pYg4J:www.crazycoder.cn/mypdf/11063.pdf+C%23+CreateFileMapping+class&hl=en&ct=clnk&cd=66
C# 3.0 Cookbook – Google Book Search
http://books.google.com/books?id=ZqKlzmETH1QC&pg=PA740&lpg=PA740&dq=CreateFileMapping+c%23&source=web&ots=GLV9PUxUDc&sig=tDeKIMPK9HLh5KRW9hxPNW882Fg&hl=en&sa=X&oi=book_result&resnum=8&ct=result#PPA735,M1
20081212 c# sharemem
http://www.yippeesoft.com/blog/index.php?job=art&articleid=a_20090814_204724
Memory Mapped Files (MMF) – Living .NET…
http://msmvps.com/blogs/manoj/archive/2003/12/05/973.aspx
Samples of MemoryMappedFile in C# or .NET
http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework/topic56317.aspx
AppDomain啥意思啊?
http://topic.csdn.net/u/20080828/17/eea71a67-bb5f-4b84-9bc7-533074070700.html
AppDomain 类_勇无止境!-帮忙喂喂我心爱的宠物
http://hi.baidu.com/heiru/blog/item/8c5957e72649ae2eb838202a.html
浅析.Net下的AppDomain编程 (转载) – 生命如此短暂,掌握技艺却要如此长久 – 博客园
http://www.cnblogs.com/lazhgg/archive/2006/01/18/319635.html
CSDN技术中心 理解AppDomain
http://dev.csdn.net/article/22/22457.shtm
Parameter between tow Application in C# : Visual C# General : Visual C# : MSDN Forums
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/184b59fc-4f7c-4fab-b62a-2f6da3cc1129/
.NET DLL calls from mq4. Is it possible? Any sample? – MQL4 forum
http://forum.mql4.com/6676/page2#30882
CodeGuru: Exporting .NET DLLs with Visual Studio 2005 to be Consumed by Native Applications
http://www.codeguru.com/csharp/csharp/cs_misc/dllsandexecutables/article.php/c14735/
Marshal Class (System.Runtime.InteropServices)
http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshal.aspx
C# dll shared memory : C#
http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_23779565.html
.NET csharp CLR Shared Memory, C# DLL load
http://www.eggheadcafe.com/software/aspnet/31040281/clr-shared-memory-c-dll.aspx
C# Programming :: Shared memory in .NET and WCF
http://www.megasolutions.net/cSharp/Shared-memory-in_NET-and-WCF-71244.aspx
很想整个共享内存类,然后直接共享当公用变量用
标签:c++, memlanguages csharp Memory Leak in C# 2.0 W/ Anonymous Delegates?
http://www.eggheadcafe.com/forumarchives/NETcsharp/Sep2005/post24005267.asp
Memory Leak in C# 2.0 W/ Anonymous Delegates? – bytes
http://bytes.com/groups/net-c/276123-memory-leak-c-2-0-w-anonymous-delegates
Choosing What To Lock On
http://www.yoda.arachsys.com/csharp/threads/lockchoice.shtml
Short but complete programs
http://www.yoda.arachsys.com/csharp/complete.html
A Timer class for C# Console Applications
http://www.mycsharpcorner.com/Post.aspx?postID=31
Locking memory and multiple timers? – bytes
http://bytes.com/groups/net-c/533034-locking-memory-multiple-timers
C#遍历文件夹及文件_耍猫的鱼
http://hi.baidu.com/bobo712/blog/item/570df12a85e1e42bd52af1d0.html
天极网—软件频道
http://www.chinabyte.com/20020122/214916.shtml
请问在C#的过程当中如何使用局部的静态变量? .NET技术 / C# – CSDN社区 community.csdn.net
http://topic.csdn.net/t/20020503/15/696086.html
c#中没有局部静态变量么?方法内的静态变量? .NET技术 / C# – CSDN社区 community.csdn.net
http://topic.csdn.net/t/20040713/16/3171049.html
用C#实现Ping程序_C#小站
http://hi.baidu.com/tcggy/blog/item/3d9567894b332cb20f2444d8.html
QuartzTypeLib.dll 文件_我的空间~我做住
http://hi.baidu.com/lxsunshuai/blog/item/7568dffa9721abd9b48f3192.html
Firefox 3地址栏技巧三则
http://www.3648.com/article/sort07/sort0177/sort0204/info-10064.html
Ubuntu中文论坛 • 查看主题 – firefox3.1搜索引擎没google的,, 添加也没发现.
http://forum.ubuntu.org.cn/viewtopic.php?f=73&t=147894&view=previous
Firefox 3 tips: 加入自定义的OpenSearch – Kukoo\’s Blog
http://www.kompakar.com.cn/kukoo/2008/07/26/add-opensearch-into-firefox/
Firefox扩展: Read it Later_深度思考,简单生活…
http://hi.baidu.com/cdcarbon/blog/item/a8086d3fb687e6ef54e723f2.html
Firefox 3 tips: 加入自定义的OpenSearch – Kukoo\’s Blog
http://www.kompakar.com.cn/kukoo/2008/07/26/add-opensearch-into-firefox/
在Firefox 3中添加淘宝网搜索引擎 – IT频道 – 21CN.COM
http://it.21cn.com/software/sygj/2008/08/14/5065234.shtml
Ubuntu中文论坛 • 查看主题 – 如何更改firefox的默认搜索引擎
http://forum.ubuntu.org.cn/viewtopic.php?t=54411
keyword.UR
firefox 更改默认搜索引擎_Davy\’s note
http://hi.baidu.com/updavy/blog/item/c1ee501b18c791d6ac6e7543.html
Re: Memory leak when removing bands from a RibbonTask – Kirill Grouchnikov – net.java.dev.flamingo.users – MarkMail
http://markmail.org/message/j6ph7dtbvgpgql3p
Can using lambdas as event handlers cause a memory leak? – Stack Overflow
http://stackoverflow.com/questions/16473/can-using-lambdas-as-event-handlers-cause-a-memory-leak
Yes, save it to a variable and unhook it.
DelegateType evt = (o, e) => &leftsign; firedCount++; Console.Write(firedCount); &rightsign;;
foo.AnEvent += evt;
foo.MethodThatFiresAnEvent();
foo.AnEvent -= evt;
And yes, if you don\’t, you\’ll leak memory, as you\’ll hook up a new delegate object each time. You\’ll also notice this because each time you call this method, it\’ll dump to the console an increasing number of lines (not just an increasing number, but for one call to MethodThatFiresAnEvent it\’ll dump any number of items, once for each hooked up anonymous method).
Debug Leaky Apps: Identify And Prevent Memory Leaks In Managed Code
http://msdn.microsoft.com/en-us/magazine/cc163491.aspx
Debug Leaky Apps: Identify And Prevent Memory Leaks In Managed Code
http://msdn.microsoft.com/en-us/magazine/cc163491.aspx
An Army of Solipsists » Blog Archive » A Grails Memory Leak
http://burtbeckwith.com/blog/?p=73
Finding Memory Leaks in .NET Applications with AQtime
http://www.automatedqa.com/techpapers/net_allocation_profiler.asp
NSURLConnection NSURLRequest Memory Leak – Mac Forums
http://forums.macrumors.com/showthread.php?t=571364
Hugo Batista : Memory Leak inside Crystal Reports XI
http://www.arquitecturadesoftware.org/blogs/hugobatista/archive/2006/02/22/memory-leak-inside-crystal-reports-xi.aspx
Rico Mariani\’s Performance Tidbits : Memory leaks 101: Objects anchored by event generators
http://blogs.msdn.com/ricom/archive/2007/01/09/memory-leaks-101-objects-anchored-by-event-generators.aspx
C#: Care about Event Memory Leaks with Delegate.GetInvocationList()
http://www.dotnetkicks.com/csharp/C_Care_about_Event_Memory_Leaks_with_Delegate_GetInvocationList
languages csharp Memory Leak in C# 2.0 W/ Anonymous Delegates?
http://www.eggheadcafe.com/forumarchives/NETcsharp/Sep2005/post24005267.asp
Memory Leak in C# 2.0 W/ Anonymous Delegates? – bytes
http://bytes.com/groups/net-c/276123-memory-leak-c-2-0-w-anonymous-delegates
More Delegates and Memory Leaks – Death By Patterns
http://dotnet.org.za/calmyourself/archive/2007/03/20/more-delegates-and-memory-leaks.aspx
CodeProject: Observable property pattern, memory leaks, and weak delegates for .NET. Free source code and programming help
http://www.codeproject.com/KB/architecture/observable_property_patte.aspx
Delegates Memory Leak!!!
http://www.velocityreviews.com/forums/t21117-delegates-memory-leak.html
Delegates Memory Leak!!!
http://www.velocityreviews.com/forums/t21117-delegates-memory-leak.html
Software Development: Issues when using MarshalByRefObject instances from several application domains
http://vadmyst.blogspot.com/2006/03/issues-when-using-marshalbyrefobject.html
Asp.Net配置log4net&line;-log4net控件应用入门实例源码&line;-51aspx.com
http://www.51aspx.com/CT/XJSNSTC51YW87/
在asp.net中使用 log4net 记录日志_芙蓉S氧气
http://hi.baidu.com/lotusoxygen/blog/item/e78b53b426bb93c837d3ca6e.html
SOS on Remoting based on httplistener?
http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework/topic63242.aspx
.NET SOS on Remoting based on httplistener?
http://www.eggheadcafe.com/software/aspnet/29887948/sos-on-remoting-based-on.aspx
Re: problem in data logging from within HttpListener
http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.framework/2006-12/msg00428.html
problem in data logging from within HttpListener : .NET Framework Networking and Communication : .NET Development : Microsoft Forums
http://social.microsoft.com/Forums/en-US/netfxnetcom/thread/025e61d1-7836-46ba-991f-ea3828939794
下载详细信息: .NET Framework 2.0 Service Pack 2
http://www.microsoft.com/downloads/details.aspx?displaylang=zh-cn&FamilyID=5b2c0358-915b-4eb5-9b1d-10e506da9d0f
andLinux.org — Run Linux natively inside Windows
http://www.andlinux.org/
给andlinux减点肥 – Windows DVB Softdevice (Win的DVB软件应用) – 南风VDR 南风&line;VDR&line;南风论坛&line;南风VDR&line;ARVDR&line;VDR&line;LINVDR&line;CNVDR&line;1020&line;1020A&line;1025&line;1027&line;DM&line;DM500&line;DM7000&line;DM7020&line;DM7025&line;dreambox&line;dreambox500&line;dreambox7000&line;dreambox7020&line;dm7020&line;dreambox7025&line;dreambox8000&line;EM8300&line;EM8400&line;EM8470&line;EM8475&line;EM8401&line;EM8471&line;卫星&line;卫星电视&line;卫视器材&line;DM500&line;雷霆430&line;卫视技术交流深圳卫星电视&line;广州卫星电视安装&line;东莞卫星天线&line;佛山卫星电视器材&line;共享&line;Video Disk Recorder&line;dvb&line;dvb-s&line;pvr&line;TT&line;FF&line;SS1&line;SS2&line;cardsharing&line;card sharing&line; – Powered by Discuz!
http://www.nanfenggx.com/bbs/viewthread.php?tid=3885
Memory Leak problems – Infragistics Forums
http://forums.infragistics.com/forums/t/16138.aspx
CodeDom and GenerateInMemory memory leak – VB.NET
http://www.techtalkz.com/vb-net/126333-codedom-generateinmemory-memory-leak.html
GC with memory leaks? – GameDev.Net Discussion Forums
http://www.gamedev.net/community/forums/topic.asp?topic_id=94358
Delegate Pattern?!? or memory leak? (OO, Patterns, UML and Refactoring forum at JavaRanch)
http://www.coderanch.com/t/98558/OO-Patterns-UML-Refactoring/Delegate-Pattern-or-memory-leak
IanG on Tap: Event Handlers, Circular References, and Alleged Memory Leaks
http://www.interact-sw.co.uk/iangblog/2004/07/07/circulareventrefs
CodeDom and GenerateInMemory memory leak
http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.languages.vb/2007-10/msg00894.html
Did it with .NET – The Problem With Delegates
http://diditwith.net/2007/03/19/TheProblemWithDelegates.aspx
The Ideal Solution
The best solution to this problem is to introduce a notion of "weak delegates" into the CLR. A weak delegate would create a weak reference to its Target rather than a strong one. Then, when the Target is garbage collected, the runtime would remove the delegate from any delegate chains that it is currently a part of. And, if there are any direct references to the delegate, they would do nothing when invoked. I\’m not sure what the C# syntax would look like for such an animal. Maybe something like this:
SystemEvents.DisplaySettingsChanged += new weak EventHandler(ehDisplaySettingsChanged);
I am not the first person to suggest something like this. In fact, there have been several. Unfortunately, because the .NET framework will be built upon the 2.0 version of the CLR for the foreseeable future, there probably won\’t be anything added for quite some time (if ever).
So, we developers are forced to roll our own solution to this problem. There have been several attempts made and not all of them have been successful. It turns out that getting the right balance of efficiency, memory use and elegance is pretty tricky. Next time, we\’ll take an in-depth look at one potential solution that I\’ve found to be successful.
Does not calling EndInvoke *really* cause a memory leak ? : Common Language Runtime : .NET Development : MSDN Forums
http://social.msdn.microsoft.com/Forums/en-US/clr/thread/b18b0a27-e2fd-445a-bcb3-22a315cd6f0d/
Delegate Pattern?!? or memory leak? (OO, Patterns, UML and Refactoring forum at JavaRanch)
http://www.coderanch.com/t/98558/OO-Patterns-UML-Refactoring/Delegate-Pattern-or-memory-leak
Greg Schechter\’s Blog : Simulating “Weak Delegates” in the CLR
http://blogs.msdn.com/greg_schechter/archive/2004/05/27/143605.aspx
Rico Mariani\’s Performance Tidbits : Tracking down managed memory leaks (how to find a GC leak)
http://blogs.msdn.com/ricom/archive/2004/12/10/279612.aspx
PerformanceCounter 基本介绍以及示例方法 – 点滴积累,融会贯通 – 博客园
http://www.cnblogs.com/xh831213/articles/1218234.html
用C#程序监控并显示CPU状态信息->>网页教学网Webjx.Com 提供最新最快的网页技术
http://www.webjx.com/htmldata/2007-07-18/1184726682.html
XGEN:Exchange 2000 Server 内存使用和 /3GB 开关
http://support.microsoft.com/kb/328882
WPF 性能分析工具
http://msdn.microsoft.com/zh-cn/downloads/aa969767.aspx
如何查看内存使用情况—使用Vadump – Managed空间 – 博客堂
http://cache.baidu.com/c?m=9d78d513d98712b8599dc2395254c321590a8f397a9192027ea78e55c33a0614506694e37a69415985926b6776fe1403f7a5652e62413de4db99d21199ec8f282d8a2129721d9b4216ce1aabca4125d620e709a8ed53&p=81769a4186cc47ac0e81c02b5f07&user=baidu
public void testarys()
&leftsign;
string[] s ;
for (int j = 10; j >0;j– )
&leftsign;
Console.WriteLine(“b &leftsign;0&rightsign;,&leftsign;1&rightsign;,&leftsign;2&rightsign;”,j,GC.GetTotalMemory(true).ToString(),Process.GetCurrentProcess().WorkingSet64);
s = null;
s= new string[100*j];
for (int i = 0; i < s.Length; i++)
&leftsign;
s[i] = new string(\’A\’, 100000);
&rightsign;
Console.WriteLine(“e &leftsign;0&rightsign;,&leftsign;1&rightsign;,&leftsign;2&rightsign;”,j, GC.GetTotalMemory(true).ToString(), Process.GetCurrentProcess().WorkingSet64);
&rightsign;
&rightsign;
b 10,465968,25997312
e 10,200496676,228806656
b 9,200497656,229027840
e 9,180493864,213479424
b 8,180522128,213676032
e 8,160491064,207650816
b 7,160492056,207683584
e 7,140488264,182136832
b 6,140489256,182136832
e 6,120485464,169148416
b 5,120486456,169148416
e 5,100482664,153440256
b 4,100483656,153440256
e 4,80479864,133603328
b 3,80480856,133603328
e 3,60477064,122961920
b 2,60478056,122961920
e 2,40474264,77578240
b 1,40475256,77578240
e 1,20471664,63135744
1 passed, 0 failed, 0 skipped, took 2.22 seconds.
b 10,471228,32579584
e 10,200503316,233181184
b 9,200504296,233181184
e 9,180500504,214294528
b 8,180501496,214294528
e 8,160497704,208306176
b 7,160498696,208306176
e 7,140494904,182587392
b 6,140495932,182587392
e 6,120497984,169771008
b 5,120499012,169771008
e 5,100495184,153886720
b 4,100496212,153886720
e 4,80492384,134234112
b 3,80493412,134234112
e 3,60489584,128184320
b 2,60490612,128184320
e 2,40486984,73428992
b 1,40488012,73428992
e 1,20487648,59179008
b 10,482848,32915456
e 10,200514860,233271296
b 9,200515888,233271296
e 9,180512060,214384640
b 8,180513088,214384640
e 8,160515868,208379904
b 7,160516896,208379904
e 7,140513068,182648832
b 6,140514096,182648832
e 6,120510268,169828352
b 5,120511296,169828352
e 5,100507468,153948160
b 4,100508496,153948160
e 4,80504668,134283264
b 3,80505696,134283264
e 3,60501868,128237568
b 2,60502896,128237568
e 2,40499268,73478144
b 1,40500296,73478144
e 1,20496268,59240448
e 1,20515220,59342848
before exit
&rightsign;
s = null;
GC.Collect();
Console.WriteLine(“e &leftsign;0&rightsign;,&leftsign;1&rightsign;,&leftsign;2&rightsign;”, 1111, GC.GetTotalMemory(true).ToString(), Process.GetCurrentProcess().WorkingSet64);
e 1111,580300,33132544
a no-mean code,test mem release
C#共享内存类 改进版_半天月·随笔 &line;&line; 拾遗
http://hi.baidu.com/bantianyue/blog/item/e97c8ed4aeacb406a18bb7a3.html
C#进程间共享内存,内存映象(MMF) – ICERAIN\’s tech BLOG – 博客园
http://www.cnblogs.com/doubaokun/archive/2008/11/27/1341918.html
共享内存操作类(C#源码)-UML软件工程组织-火龙果软件
http://www.uml.org.cn/net/200809013.asp
C#下的进程间的通讯 — 共享内存篇——奴隶
http://www.x2blog.cn/jinhong618/21581.html
C#共享内存实例 附源码_半天月·随笔 &line;&line; 拾遗
http://hi.baidu.com/bantianyue/blog/item/f175dfb4504a1d748bd4b2da.html
c# 进程间同步实现 进程之间通讯的几种方法 – 静水流深 – 博客园
http://www.cnblogs.com/sandy81/archive/2008/10/15/1311722.html
在.NET中使用命名管道完成进程间通信
http://www.hackhome.com/InfoView/Article_121029_3.html
使用微软消息队列实现C#进程间通信(1) – C#编程 – 技术应用 – 豆豆网
http://tech.ddvip.com/2007-11/119554606737754.html
Build a C# Named-Pipes Based Inter-Process,Inter-Machine Object Caching Service
http://www.eggheadcafe.com/articles/20060404.asp
.NET csharp Using NamedPipes in C#
http://www.eggheadcafe.com/software/aspnet/29482882/using-namedpipes-in-c.aspx
C#, .Net Framework: Build a C# Named Pipes Interprocess, inter-machine Cache Service
http://www.kinlan.co.uk/2006/04/build-c-named-pipes-interprocess-inter.html
CodeProject: Inter-Process Communication in .NET Using Named Pipes, Part 2. Free source code and programming help
http://www.codeproject.com/KB/threads/dotnetnamedpipespart2.aspx
在.NET中使用命名管道完成进程间通信_动网_社区论坛·开发者网络源动力
http://www.cndw.com/tech/program/2006041947315.asp
在.NET中使用命名管道完成进程间通信 – 软件工程 – 网络编程 – www.DevDao.com
http://www.devdao.com/Article/396126.htm
Windows中的Pipe – λ-calculus in C++Blogs – C++博客
http://www.cppblog.com/vczh/archive/2008/08/01/57697.html
Named Pipes – Sample code for new .NET 3.5 classes – nntpnews.net
http://www.nntpnews.net/f3634/named-pipes-sample-code-new-net-3-5-classes-4627358/
关于framework3.5中管道
http://topic.csdn.net/u/20080517/13/e97124dd-eba2-40e6-8e4b-d73e17083cbe.html
C#共享内存类改进版 – 半天月·随笔 &line;&line; 拾遗 – CSDNBlog
http://blog.csdn.net/zzh8845/archive/2008/11/22/3350150.aspx
C#共享内存实例 附源码 – 半天月·随笔 &line;&line; 拾遗 – CSDNBlog
http://blog.csdn.net/zzh8845/archive/2008/11/22/3349963.aspx
C# auto update – lundy的专栏 – CSDNBlog
http://blog.csdn.net/lundy/archive/2007/06/26/1666936.aspx
远程自动更新源码(C#版本) CSDN 下载频道
http://download.csdn.net/source/834477
饿郎原创-开源项目
http://www.jrgz2008.com/blog/post/opensource.html
饿郎原创-【原创程序】C#客户端软件自动升级程序
http://www.jrgz2008.com/blog/post/soft/AutoUpDate.html
在WinForm中使用Web Services 来实现 软件 自动升级( Auto Update ) (C# – Kevins_Leader的专栏 – CSDNBlog
http://blog.csdn.net/kevins_leader/articles/624680.aspx
在WinForm中使用Web Services 来实现 软件 自动升级( Auto Update ) (C# – Kevins_Leader的专栏 – CSDNBlog
http://blog.csdn.net/kevins_leader/articles/624680.aspx
自动更新程序源码下载(C#.Net) – jenry-云飞扬 – 博客园
http://www.cnblogs.com/jenry/archive/2006/09/26/477302.html
100分请教 C/S程序更新问题
http://topic.csdn.net/u/20070813/15/fe727341-5a69-4404-b79b-1009f040857b.html?1353246953
CodeGuru: An AutoUpdate Trick
http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c9331
C# Auto Update : Visual Studio Smart Device Development – Visual Basic and C# Projects : Smart Device Development : MSDN Forums
http://social.msdn.microsoft.com/forums/en-US/vssmartdevicesvbcs/thread/48b40777-e404-4a2d-b9ce-4ff54209e7b4/
CodeProject: Application Auto Update Revisited. Free source code and programming help
http://www.codeproject.com/KB/vb/Auto_Update_Revisited.aspx
转别人的用C#实现软件自动更新思路_快乐D小孩
http://hi.baidu.com/happybadbaby/blog/item/6e22e9e94cba673ab80e2d90.html
自动更新程序源码下载(C#.Net)_我的空间,我做主
http://hi.baidu.com/ruishicun/blog/item/ee661bfb6137d6274f4aeaa1.html
C# CS架构自动更新服务器端 自动生成 xml配置文件1_JAIMY
http://hi.baidu.com/jaimy%5Fjie/blog/item/b1a549bf9b57580e18d81fbd.html
C#WinForm App自动更新(Live Update)架构_java & .net营地(java&.net&javascript相关收集)
http://hi.baidu.com/czh0221/blog/item/d545d8ef46d81c33adafd5db.html
桌面上显示隐藏回收站(注册表)_天涯明月心
http://hi.baidu.com/he520888/blog/item/a9b16d97a29fc26e54fb9667.html
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\NonEnum]
"&leftsign;645FF040-5081-101B-9F08-00AA002F954E&rightsign;"=dword:00000001
菜鸟玩转SP手机_窝客
http://hi.baidu.com/%E7%AA%9D%E5%AE%A2/blog/item/8f46ea012c3d20011c958378.html
CodeProject: A wrapped class of share memory. Free source code and programming help
http://www.codeproject.com/KB/cpp/Share_Memory.aspx?display=PrintAll
C#共享内存类 改进版_半天月·随笔 &line;&line; 拾遗
http://hi.baidu.com/bantianyue/blog/item/e97c8ed4aeacb406a18bb7a3.html
C#进程间共享内存,内存映象(MMF) – ICERAIN\’s tech BLOG – 博客园
http://www.cnblogs.com/doubaokun/archive/2008/11/27/1341918.html
共享内存操作类(C#源码)-UML软件工程组织-火龙果软件
http://www.uml.org.cn/net/200809013.asp
C#下的进程间的通讯 — 共享内存篇——奴隶
http://www.x2blog.cn/jinhong618/21581.html
超级难题:.net 中CreateFileMapping 创建共享内存问题 .NET技术 / C# – CSDN社区 community.csdn.net
http://topic.csdn.net/t/20060227/23/4581904.html
C#共享内存实例 附源码_半天月·随笔 &line;&line; 拾遗
http://hi.baidu.com/bantianyue/blog/item/f175dfb4504a1d748bd4b2da.html
C#共享内存
CodeProject: A C# Framework for Interprocess Synchronization and Communication. Free source code and programming help
http://www.codeproject.com/KB/threads/csthreadmsg.aspx
C#共享内存类 改进版_半天月·随笔 &line;&line; 拾遗
http://hi.baidu.com/bantianyue/blog/item/e97c8ed4aeacb406a18bb7a3.html
共享内存操作类(C#源码)(转)_Whuisland
http://hi.baidu.com/whuisland/blog/item/96128d23797ff34a92580713.html
C#共享内存实例 附源码_半天月·随笔 &line;&line; 拾遗
http://hi.baidu.com/bantianyue/blog/item/f175dfb4504a1d748bd4b2da.html
C#共享内存实例 附源码_半天月·随笔 &line;&line; 拾遗
http://hi.baidu.com/bantianyue/blog/item/f175dfb4504a1d748bd4b2da.html
CodeProject: A C# Framework for Interprocess Synchronization and Communication. Free source code and programming help
http://69.10.233.10/KB/threads/csthreadmsg.aspx
CodeProject: A C# Framework for Interprocess Synchronization and Communication. Free source code and programming help
http://69.10.233.10/KB/threads/csthreadmsg.aspx
CodeProject: A C# Framework for Interprocess Synchronization and Communication. Free source code and programming help
http://www.codeproject.com/KB/threads/csthreadmsg.aspx?display=Print
.NET csharp share a structure array containing multidimensional char array C#/
http://www.eggheadcafe.com/software/aspnet/32002091/share-a-structure-array-c.aspx
优化UMPC应用程序的点触和手写操作 — ITDB教程库
http://www.itdb.cn/n/200609/27/n20060927_74102.shtml
TheMSsForum.com >> VB >> Custom form border – The Microsoft Software Forum
http://www.themssforum.com/VB/Custom-form/
将外部应用程序嵌入WinForm中 @阿良.NET
http://www.chenjiliang.com/Article/View.aspx?ArticleID=2103&TypeID=88
CodeProject: Hosting EXE Applications in a WinForm project. Free source code and programming help
http://www.codeproject.com/KB/miscctrl/AppControl.aspx
将外部应用程序嵌入WinForm中 @阿良.NET
http://www.chenjiliang.com/Article/View.aspx?ArticleID=2103&TypeID=88
C#设置任务栏透明度 – 蓝风 Love
http://www.seewind.cn/blog/article.asp?id=2
winfrm钉入桌面 – 蓝风 Love
http://www.seewind.cn/blog/article.asp?id=3
WinFrm具有鼠标穿透功能 – 蓝风 Love
http://www.seewind.cn/blog/article.asp?id=4
CodeProject: Essential P/Invoke. Free source code and programming help
http://www.codeproject.com/KB/cs/essentialpinvoke.aspx
Shared Memory: Another problem : Visual C# Language : Visual C# : MSDN Forums
http://social.msdn.microsoft.com/forums/en-US/csharplanguage/thread/d3591acb-c14b-4e90-ac0e-bcdc942ff1bd/
Akismet C# API for the .Net Framework 1.1 and 2.0
http://www.arnebrachhold.de/2006/04/18/akismet-anti-spam-library-for-the-dotnet-framework/
C# 3.0 Cookbook – Google Book Search
http://books.google.com/books?id=ZqKlzmETH1QC&pg=PA740&lpg=PA740&dq=C%23+CreateFileMapping+class&source=web&ots=GLUiJZpLG8&sig=4Fk3HmD9L_rX9x_j22ui7EQ0vEw&hl=en&sa=X&oi=book_result&resnum=11&ct=result#PPA748,M1
操作系统–进程通信–共享存储区之实现方法 – 操作系统 – 栀子博客-栀子花驿站
http://www.zhizihua.com/blog/post/119.html
c#操作内存数据,共享内存操作类(C#源码)
http://72.14.235.132/u/loyolachicago?q=cache:9IUf9G7pYg4J:www.crazycoder.cn/mypdf/11063.pdf+C%23+CreateFileMapping+class&hl=en&ct=clnk&cd=66
C# 内存映射读取大文本
http://www.aixinff.com/htmls/2618.html
【200分】求C# 内存映射文件的代码_百度知道
http://zhidao.baidu.com/question/40508551.html
shared memory
http://www.bokebb.com/dev/english/1958/posts/195851969.shtml
在C#中如何使用CreateFileMapping、OpenFileMapping、MapViewOfFile等SDK函数 .NET技术 / C# – CSDN社区 community.csdn.net
http://topic.csdn.net/t/20030629/19/1970862.html
Koders Code Search: memorymapfile.cs – C#
http://www.koders.com/csharp/fidBDFD53221D3277A358C793424798A0AE320AEB70.aspx?s=DateTime
C#共享内存实例 – 技术应用 – 豆豆网
http://tech.ddvip.com/2008-12/122887477998748.html
在C#中,如何实现共享内存? .NET技术 / C# – 社区 community.csdn.net
http://www.80diy.com/home/20031213/17/2560602.html
共享内存操作类 C#_.Net技术文章_Asp.net_网站开发
http://www.diybl.com/course/4_webprogram/asp.net/netjs/20071020/78544.html
进程间如何实现内存共享? VC/MFC / 进程/线程/DLL – 社区 community.csdn.net
http://www.80diy.com/home/20010324/13/88350.html
超级难题:.net 中CreateFileMapping 创建共享内存问题 .NET技术 / C# – CSDN社区 community.csdn.net
http://topic.csdn.net/t/20060227/23/4581904.html
C# 3.0 in a Nutshell – Code Listings
http://www.albahari.com/nutshell/ch22.aspx
CodeProject: A C# Framework for Interprocess Synchronization and Communication. Free source code and programming help
http://www.codeproject.com/KB/threads/csthreadmsg.aspx
A .NET Memory-Mapped File Cache Infrastructure
http://www.eggheadcafe.com/articles/20050116.asp
API -> CreateFileMapping [ Library : kernel32.dll, Category : File Management ] [C#, VB, VB.net]
http://binaryworld.net/Main/ApiDetail.aspx?ApiId=860
IPC between .NET and Java client applications – Stack Overflow
http://stackoverflow.com/questions/317327/ipc-between-net-and-java-client-applications
Share memory between two .net application – bytes
http://bytes.com/groups/net-c/788654-share-memory-between-two-net-application
中国DotNet俱乐部——首页
http://www.chinaaspx.com/archive/develop/5014.htm
一个完整的共享內存类
http://www.chinaitpower.com/A/2005-02-26/109238.html
共享内存操作类 C# .net实例,.net技巧,.net教程,电脑教程,软件教程,学网
http://www.xue5.com/itedu/200802/106184.html
鍦–#涓浣曚娇鐢–reateFileMapping銆丱penFileMapping銆丮apViewOfFile绛塖DK鍑芥暟 .NET鎶€鏈� / C# – 绀惧尯 community.csdn.net
http://www.80diy.com/home/20030629/19/1970862.html
CSDN技术中心 跨进程访问共享内存的权限问题
http://dev.csdn.net/article/29/29573.shtm
CodeProject: Using Memory Mapped Files in ASP.NET using VB.NET. Free source code and programming help
http://www.codeproject.com/KB/aspnet/VbNetMemoryMappedCache.aspx
Samples of MemoryMappedFile in C# or .NET
http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework/topic56317.aspx
CodeProject: Share images across processes from C++ to C#. Free source code and programming help
http://69.10.233.10/KB/dotnet/ShareImageAcrossProcesses.aspx
匿名管道的实现 管道(Pipe)实际是用于进程间通信的一段共享内存,创建管道的进程称为管道服务器,连接到一个管道的进程为管道客户机。一个进程在向管道写入数据后,另一进程就可以从管道的另一端将其读取出来。 CSDN 下载频道
http://download.csdn.net/source/861638
对于Windows的进程间通信的方式
http://www.uml.org.cn/zjjs/2008111011.asp
Pipes in .NET – C# – Xtreme .NET Talk
http://www.xtremedotnettalk.com/showthread.php?t=73651
CodeGuru: Inter-Process Communication in .NET Using Named Pipes, Part 2
http://www.codeguru.com/csharp/.net/net_general/patterns/article.php/c7261
Using Named Pipes in C# / Windows &line; Dijksterhuis.Org
http://www.dijksterhuis.org/using-named-pipes-in-c-windows/
running pipe in c#
http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.languages.csharp/2007-08/msg04054.html
Interprocess Communication using Named Pipes in C#
http://blog.paranoidferret.com/index.php/2007/07/25/interprocess-communication-using-named-pipes-in-csharp/
Named Pipes in C# : .NET Base Class Library : .NET Development : MSDN Forums
http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/cda13de0-7b38-41bd-a0d1-cd7bd63dfb76/
Creating a Low Integrity named pipe in C#
http://www.flawlesscode.com/post/2008/02/Creating-a-Low-Integrity-named-pipe-in-C.aspx
Named Pipes Client and Server Communication : Visual C# General : Visual C# : MSDN Forums
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/17370c35-c827-4ae7-b7dd-1d27ad257f39/
Enforcing single instance with argument passing
http://www.flawlesscode.com/post/2008/02/Enforcing-single-instance-with-argument-passing.aspx
BCL Team Blog : Introducing Pipes [Justin Van Patten]
http://blogs.msdn.com/bclteam/archive/2006/12/07/introducing-pipes-justin-van-patten.aspx
CodeProject: Inter-Process Communication in .NET Using Named Pipes, Part 1. Free source code and programming help
http://www.codeproject.com/KB/threads/dotnetnamedpipespart1.aspx
20071017 memory leak c++ new malloc CEGUI
http://www.yippeesoft.com
使用 memleak 检查和调试内存泄漏
http://blog.iyi.cn/hily/archives/2007/09/_memleak.html
memleak 的原理是利用 C 语言的宏调用来替代原有的函数调用,比如我们在代码中调用 malloc(s),实际是调用了:dbg_malloc(s),这个宏定义在 memleak.h 中给出:
#define malloc(s) (FILE_LINE, dbg_malloc(s))
memleak 维护了一个链表,在这个链表中保存着程序中对内存函数调用的记录,这些函数包括:malloc、calloc、realloc、free。每次调用这些函数时,就会更新这个链表。
有了这个表,我们就可以在适当的位置调用 memleak 提供的函数,显示一些重要的信息,包括 malloc、calloc、realloc、free调用的次数,申请及分配的内存数,调用的文件和位置等等,信息非常详细。有了这些功能,我们就很容易定位内存使用的错误源。
http://www.linuxquestions.org/questions/showthread.php?t=281830
"It\’s not an extra new-line, each line should be terminated by an "end of line" tag, and this is \\n under unix.
On MacOS, this used to be \\r, perhaps the reason why gcc is more tolerant on newer releases of this O/S."
– 有人思考过 –
"do you know real reason of that?"
– 马上就有人提出质疑 –
"There\’s probably still some ancient compilers out there (maybe even very old versions of GCC?) that want each line to end with a newline or else they crash. My guess is that GCC is just trying to help you make your code compatible with these dino\’s."
– 接着就有人提出自己的观点 –
"Actually, gcc warns about it because it has to according to the standard. Check out this link for a brief description: http://gcc.gnu.org/ml/gcc/2003-11/msg01568.html
If you have a compiler that doesn\’t warn you about the lack of a newline character then that compiler doesn\’t meet the standards. Burn the disc it came on and get a real compiler."
– 很快,依靠大家的力量,借助网络,答案浮出水面 –
"The C language standard says
A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character.
Since this is a "shall" clause, we must emit a diagnostic message for a violation of this rule.
This is in section 2.1.1.2 of the ANSI C 1989 standard. Section 5.1.1.2 of the ISO C 1999 standard (and probably also the ISO C 1990 standard)."
CEGUI(Crazy Eddie’s GUI http://www.cegui.org.uk)是一个自由免费的GUI库,基于LGPL协议,使用C++实现,完全面向对象设计。CEGUI开发者的目的是希望能够让游戏开发人员从繁琐的GUI实现细节中抽身出来,以便有更多的开发时间可以放在游戏性上。
CEGUI的渲染需要3D图形API的支持,如OpenGL或Direct3D。另外,使用更高级的图形库也是可以的,像是OGRE、Irrlicht和RenderWare,关键需求可以简化为二点:
1. 纹理(Texture)的支持
2. 直接写屏(RHW的顶点格式、正交投影、或者使用shader实现)
CEGUI(Crazy Eddie’s GUI http://www.cegui.org.uk )是一套开源的使用C++开发的游戏界面库, 基于LGPL协议. 它能减少游戏开发中繁琐而大量的UI开发工作量. 现有很多游戏开发都会利用或者是借鉴它.
在学习了解CEGUI之前, 先把CEGUI源代码的环境搭建起来. CEGUI使用了几套开源库Freetype(http://sourceforge.net/projects/freetype), Glut(http://www.opengl.org/resources/libraries/glut), Xerces(http://xml.apache.org). 更全的信息资料大家可以去相应的网站上面了解. 下载相关库或者源代码后, 先在IDE中设置好, 那么就可以先编译CEGUI.
注意在使用freetype库时, CEGUIBASE工程链接会报错,提示为CEGUIBase error LNK2001: 无法解析的外部符号 _otv_module_class. 解决方法是在Freetype工程中打开ftmodule.h文件, 把FT_USE_MODULE(otv_module_class)这句代码注释掉,然后重新编译既可.
使用 cegui 来制作界面 , 不论在何种平台下 , 有基本的三大步骤要做 :
1, 创建一个 CEGUI::Render 实例
2, 创建 CEGUI::System 对象
3, 调用各种方法来渲染用户界面
第一步 , 在我使用的 ogre 环境下使用以下代码来创建 CEGUI::Render 实例
Ogre3D
CEGUI::OgreCEGUIRenderer* myRenderer =
new CEGUI::OgreCEGUIRenderer(myRenderWindow);
第二步相当简单 , 可使用
new CEGUI::System(myRenderer);
第三步,基本上来讲,大部分平台下,如 direct3D, OpenGL, 我们在渲染循环的尾部调用
CEGUI::System::renderGUI 来开始界面的渲染。如果我们使用 ogre3d 引擎,这一步不需要
我们显示的执行。因为 ogre 引擎已经考虑了。
CEGUI ,全称 "Crazy Eddie\’s GUI System" ,是一个专门的用户界面库,开源并且免费,它支持 DirectX8 、 DirectX9 ,除了可以作为 OGRE 的界面外挂,还支持另一个免费开源的 3D 引擎 Irrlicht 。由于它功能的相对强大和灵活, OGRE 的开发团队一直在推荐 OGRE 用户使用这个 CEGUI 来开发用户界面,逐渐抛弃 OGRE 本身过于简陋的 GUI 插件。尤其是在行将到来的新版本 OGRE 1.5 的声明中特别强调了这一点,尽管这个版本仍然暂时保留内置 GUI 系统,但 OGRE 1.5 将会是最后一个保留内置 GUI 的版本。 OGRE 看来似乎将专注于向一个纯粹的、然而富于协作和扩展性的图形引擎发展,这应该得益于它的庞大的社群支持,使得很多事情可以通过外挂一些更专业的引擎来实现,物理引擎使用 ODE 、 Tokamak 、 NovodeX ,网络引擎使用 openTNL 、 RakNet 、 eNet ,声音引擎使用 FMod 、 OpenAL ,以及这个界面引擎,使用 CEGUI 。外挂现成模块的好处就是可以专注于一个方面,开发一个五脏俱全的游戏引擎并不是个容易的事情,市面上最负盛名的几个商业引擎的开发, Unreal 、Renderware 、 Lithtech ,往往要耗费数百人年,并且在这些商业引擎中同样会使用外挂的商业库,在这个年代,没有人可以从头创建一切。
debugging memory leaks on uClinux專案程式已經膨脹到超過 50 個 .c, 外加 link 一份超大 C++ binary object, 這麼大的程式要在uclinux 上debug memory leak還真麻煩……
<br />
<br />好啦, 我承認當初不應該輕易打破 portability原則, 搞得現在沒辦法在 x86 debug.
<br />
<br />uclibc 好像有提供一些支援, 看到了這個
<br /><em>>make menuconfig</em>
<br /><strong><em>uClibc development/debugging options</em></strong>
<br /><strong><em> Build malloc with debugging support </em></strong>
<br /><strong><em></em></strong>
<br />希望這招有效, 明天來驗證
<br />
20071017 memory leak c++ new malloc
http://www.yippeesoft.com
Linux下的一个很好的内存泄漏检测工具 CSDN Blog推出文章指数概念,文章指数是对Blog文章综合评分后推算出的,综合评分项分别是该文章的点击量,回复次数,被网摘收录数量,文章长度和文章类型;满分100,每月更新一次。
最近做项目时用到的--valgrind.
能检测
1)使用未初始化的内存
2)读/写已经被释放的内存
3)读/写内存越界
4)读/写不恰当的内存栈空间
5)内存泄漏
6)使用malloc/new/new[]和free/delete/delete[]不匹配。
最简单的使用: valgrind –leak=check=full 后跟执行文件。
如何在linux下检测内存泄漏
http://www-128.ibm.com/developerworks/cn/linux/l-mleak/
http://blog.linuxpk.com/3973/viewspace-781
一个跨平台的 C++ 内存泄漏检测器
malloc是动态分配内存,只负责分配内存.并未调用任何函数。因为string类比较复杂,在输入字符串中还存在内存需求,结构中还含有指针。malloc并不管这些指针指向何方。
new还要调用对象的构造函数,对对象有一个初步的初始化。其指针所指地址已准备好了。
——————————————————–
New
会调用构造函数
delete
会调用析构函数
malloc free只能申请和释放普通类型
——————————————————–
malloc给你一块完整的内存,然后什么事情都不作,只是给你内存,使用于C,然后具体使用(包括INIT等都是由其他代码完成的)
而NEW是C++的东西,适合产生类啊,数组等差别很大
假设用两种方法给一个包含10个string对象的数组分配空间,一个用malloc,另一个用new:
string *stringArray1 =
static_cast<string*>(malloc(10 * sizeof(string)));
string *stringArray2 = new string[10];
其结果是,stringArray1确实指向的是可以容纳10个string对象的足够空间,但内存里并没有创建这些对象。而且,如果你不从这种晦涩的语法怪圈(详见条款M4和M8的描述)里跳出来的话,你没有办法来初始化数组里的对象。换句话说,stringArray1其实一点用也没有。相反, stringArray2指向的是一个包含10个完全构造好的string对象的数组,每个对象可以在任何读取string的操作里安全使用。
假设你想了个怪招对stringArray1数组里的对象进行了初始化,那么在你后面的程序里你一定会这么做:
free(stringArray1);
delete [] stringArray2; // 参见条款5:这里为什么要加上个"[]"
调用free将会释放stringArray1指向的内存,但内存里的string对象不会调用析构函数。如果string对象象一般情况那样,自己已经分配了内存,那这些内存将会全部丢失。相反,当对stringArray2调用delete时,数组里的每个对象都会在内存释放前调用析构函数。
既然new和delete可以这么有效地与构造函数和析构函数交互,选用它们是显然的。
把new和delete与malloc和free混在一起用也是个坏想法。对一个用new获取来的指针调用free,或者对一个用malloc获取来的指针调用delete,其后果是不可预测的。大家都知道“不可预测”的意思:它可能在开发阶段工作良好,在测试阶段工作良好,但也可能会最后在你最重要的客户的脸上爆炸。
new/delete和malloc/free的不兼容性常常会导致一些严重的复杂性问题。举个例子,<string.h>里通常有个strdup函数,它得到一个char*字符串然后返回其拷贝:
char * strdup(const char *ps); // 返回ps所指的拷贝
在有些地方,C和C++用的是同一个strdup版本,所以函数内部是用malloc分配内存。这样的话,一些不知情的C++程序员会在调用strdup后忽视了必须对strdup返回的指针进行free操作。为了防止这一情况,有些地方会专门为C++重写strdup,并在函数内部调用了new,这就要求其调用者记得最后用delete。你可以想象,这会导致多么严重的移植性问题,因为代码中strdup以不同的形式在不同的地方之间颠来倒去。
C++程序员和C程序员一样对代码重用十分感兴趣。大家都知道,有大量基于malloc和free写成的代码构成的C库都非常值得重用。在利用这些库时,最好是你不用负责去free掉由库自己malloc的内存,并且/或者,你不用去malloc库自己会free掉的内存,这样就太好了。其实,在C++程序里使用malloc和free没有错,只要保证用malloc得到的指针用free,或者用new得到的指针最后用delete来操作就可以了。千万别马虎地把new和free或malloc和delete混起来用,那只会自找麻烦。
既然malloc和free对构造函数和析构函数一无所知,把malloc/free和new/delete混起来用又象嘈杂拥挤的晚会那样难以控制,那么,你最好就什么时候都一心一意地使用new和delete吧。
malloc只是分配空间.
new除了分配空间,还负责初始化.
free只负责释放空间.
delete除了释放空间,还负责析构.
需要包含头文件:
#i nclude <alloc.h>
或
#i nclude <stdlib.h>
函数声明(函数原型):
void *malloc(int size);
说明:malloc 向系统申请分配指定size个字节的内存空间。返回类型是 void* 类型。void* 表示未确定类型的指针。C,C++规定,void* 类型可以强制转换为任何其它类型的指针。
从函数声明上可以看出。malloc 和 new 至少有两个不同: new 返回指定类型的指针,并且可以自动计算所需要大小。比如:
int *p;
p = new int; //返回类型为int* 类型(整数型指针),分配大小为 sizeof(int);
或:
int* parr;
parr = new int [100]; //返回类型为 int* 类型(整数型指针),分配大小为 sizeof(int) * 100;
而 malloc 则必须由我们计算要字节数,并且在返回后强行转换为实际类型的指针。
int* p;
p = (int *) malloc (sizeof(int));
第一、malloc 函数返回的是 void * 类型,如果你写成:p = malloc (sizeof(int)); 则程序无法通过编译,报错:“不能将 void* 赋值给 int * 类型变量”。所以必须通过 (int *) 来将强制转换。
第二、函数的实参为 sizeof(int) ,用于指明一个整型数据需要的大小。如果你写成:
int* p = (int *) malloc (1);
代码也能通过编译,但事实上只分配了1个字节大小的内存空间,当你往里头存入一个整数,就会有3个字节无家可归,而直接“住进邻居家”!造成的结果是后面的内存中原有数据内容全部被清空。
malloc 也可以达到 new [] 的效果,申请出一段连续的内存,方法无非是指定你所需要内存大小。
比如想分配100个int类型的空间:
int* p = (int *) malloc ( sizeof(int) * 100 ); //分配可以放得下100个整数的内存空间。
另外有一点不能直接看出的区别是,malloc 只管分配内存,并不能对所得的内存进行初始化,所以得到的一片新内存中,其值将是随机的。
除了分配及最后释放的方法不一样以外,通过malloc或new得到指针,在其它操作上保持一致。
标签:c++, leak, malloc, mem, memory, new20070221 cvs out of memory
http://www.yippeesoft.com/
我在使用cvs签出某个大文件的时候总是提示“cvs [server aborted]: out of memory; can not reallocate 337641472 bytes 错误,CVS操作失败”
我服务器是1个G内存的,那个文件才300M怎么会这样呢。
我试验了229M的文件,OK。配置512M的笔记本
估计两个:
1、CVS SRV 版本
2、服务器 客户机的临时空间
资料:
cvs [server aborted]: out of memory
Tom Simons writes:
>
> When checking out a directory with large binary files, cvs fails with
> "out of memory". How can we get around this?
Don\’t store large binary files in a source control system.
You need to make more virtual memory available on the server. How you
do that is, of course, system specific. On Unix-like systems, you need
to make more swap space available.
-Larry Jones
It\’s SUSIE! It\’s a GIRL! Santa would understand! — Calvin
Is there a limit with big files (82 Mega) in CVS?
i\’ve got a problem with handling big files. I\’ve got a big tar file in a project. It\’s about 82 megabyte. I can import the file into the repository, but if i want to check out or export the module, i get the message from cvs server that he can not allocate enough space ("out of memory; can not allocate 82055169 bytes). Is there an option in cvs to be set???
)
Compiling a 64 bit version solved this problem for me.
At our site the problem was solved by adding more physical ram into the machine. We now have 2GB RAM and are able to add files with 600 MB (the biggest file we ever had)
——————————————————————————–
CVS does not impose any limitations on file size. The above error suggests that your CVS server requires more virtual memory, or is running out of disk space in the CVS server\’s temporary directory.
–Jhyslop 17:38, 28 Oct 2005 (EDT)
Terminated with fatal signal 11
This message usually indicates that CVS (the server, if you\’re using client/server mode) has run out of (virtual) memory. Although CVS tries to catch the error and issue a more meaningful message, there are many circumstances where that is not possible. If you appear to have lots of memory available to the system, the problem is most likely that you\’re running into a system-wide limit on the amount of memory a single process can use or a similar process-specific limit. The mechanisms for displaying and setting such limits vary from system to system, so you\’ll have to consult an expert for your particular system if you don\’t know how to do that.
I was testing a script and ran into this problem with 2.5.01 (Travis) Build
1976 and 2.5.01 (Travis) Build 1990.
When I issue a cvs log command on one of our very large binary files, I get
an out of memory error:
>cvs log uaMain2.exe
cvs [server aborted]: out of memory; can not reallocate 415236096 bytes
This is on our hot backup server which is running W2K3 Server, and has 1GB
of memory. VM is set to 1.5GB, and watching the task manager, CVSNT throws
the error when the PF hits 1.0GB (It\’s idling at 200MB).
On our primary server, which is running XP Pro SP1 with 1GB of memory and
2.0.41a this works fine (the repositories are copied from the primary to the
hot backup each night).
The client in both cases is 2.0.62.1817. The ,v file is 538MB with 37
revisions of 13MB each.
Crash with out of memory error
More information -
Just noticed how new this build is, so I downgraded to version 1.11.1.2, and
that fixed the problem. I\’m now able to use CVSNT without a problem.
Looks like this is a bug in 1.11.1.3.
标签:mem, memory0228 c c++ callback member funciton Singleton
最后还是这样,产生一个全局的单态类实例指针,然后再在静态函数里面倒腾吧
Program 77
#include <iostream>
#include <windows.h>
using namespace std;
typedef void(*pFUN)();
#pragma pack(push,1)
// structure to store the machine code
struct Thunk
&leftsign;
BYTE m_jmp; // op code of jmp instruction
DWORD m_relproc; // relative jmp
&rightsign;;
#pragma pack(pop)
class C
&leftsign;
public:
Thunk m_thunk;
static C* g_pC = NULL;
static C *instance() &leftsign;
if (g_pC == NULL)
g_pC = new C();
return g_pC;
&rightsign;
void Init(pFUN pFun, void* pThis)
&leftsign;
// op code of jump instruction
m_thunk.m_jmp = 0xe9;
// address of the appripriate function
m_thunk.m_relproc = (int)pFun – ((int)this+sizeof(Thunk));
FlushInstructionCache(GetCurrentProcess(),
&m_thunk, sizeof(m_thunk));
&rightsign;
// this is cour call back function
static void CallBackFun()
&leftsign;
C* pC = g_pC;
// initilize the thunk
pC->Init(StaticFun, pC);
// get the address of thunk code
pFUN pFun = (pFUN)&(pC->m_thunk);
// start executing thunk code which will call StaticFun
pFun();
cout << "C::CallBackFun" << endl;
&rightsign;
static void StaticFun()
&leftsign;
cout << "C::StaticFun" << endl;
&rightsign;
&rightsign;;
int main()
&leftsign;
C objC;
g_pC = &objC;
C::CallBackFun();
return 0;
&rightsign;
The output of this program is
C::StaticFun
C::CallBackFun
Here StaticFun is called through the thunk, which is initialized in the Init member function. The execution of program is something like this
CallBackFun
Init (to initialize the thunk)
Get the address of thunk
Execute thunk
Thunk code call StaticFun
0228 LINUX WINDOW C C++ 回调函数 成员函数 error (2006-6-23)
· 0228 C C++ callback memberfunc info (2006-6-22)
· 0228 cdecl VC callback c2664 (2006-6-21)
· 0228 cdecl C2664 msdn (2006-6-20)
标签:c++, call, callback, mem0228 C C++ callback memberfunc info
网上资料倒是不少:
c++的class有一个隐含的this, 所以的调用其实都是通过this进行的, 比如:
引用:
class Foo
&leftsign;
public:
void func() &leftsign;m_int = 0;&rightsign;
private:
int m_int;
&rightsign;
其实func()里面发生的是this->m_int = 0; 就是说class会自动添加这个this. 而thread里面的函数, 其实是按系统的call back方式调用的, 纯c的方式, 不会添加这个this, 这样在函数传递是堆栈里面就没有传递this, 所以这个函数指针就是无效的. 为了防止这种行为, c++的编译器都检测并禁止这种行为.
非成员函数没有this, static 成员函数不接收this, 所以是两种可以被接受的方式.
子线程函数可以是成员函数,要求就是成员函数是static的。之所以有这样的要求,是因为类的成员函数(除了static的),都默认有个this参数用来访问对象的内部成员函数和变量,虽然这个参数没有显示出来,但是编译器会自动添加。这样最后生成的 成员函数是不可能满足_beginthread或者CreateThread以及其他一些api函数(例如需要回调函数的API)的要求的,因为这些API的参数是不会接受一个有this指针参数的函数的。
static函数没有this指针参数,所以可以用来作为线程或者回调函数。但是static函数不能访问类的非static成员。要解决这个问题,一个简单的做法是把this指针作为参数在创建线程的时候传给线程函数,线程函数里面把这个指针cast成 类的指针,通过这个指针就可以访问类的成员了。
问题是 我又不能添加参数,这都是定义死了的~~~~~~~
不定义类成员函数为线程函数,而将线程函数定义为类的友元函数。这样,线程函数也可以有类成员函数同等的权限;
实际上也还是要传一个THIS指针
回调函数和成员函数
许多程序员都发现,利用MFC或者其它的C++应用编写回调函数是非常麻烦的,其根本原因是回调函数是基于C编程的Windows SDK的技术,不是针对C++的,程序员可以将一个C函数直接作为回调函数,但是如果试图直接使用C++的成员函数作为回调函数将发生错误,甚至编译就不能通过。通过查询资料发现,其错误是普通的C++成员函数都隐含了一个传递函数作为参数,亦即“this”指针,C++通过传递一个指向自身的指针给其成员函数从而实现程序函数可以访问C++的数据成员。这也可以理解为什么C++类的多个实例可以共享成员函数但是确有不同的数据成员。由于this指针的作用,使得将一个CALLBACK型的成员函数作为回调函数安装时就会因为隐含的this指针使得函数参数个数不匹配,从而导致回调函数安装失败。要解决这一问题的关键就是不让this指针起作用,通过采用以下两种典型技术可以解决在C++中使用回调函数所遇到的问题。这种方法具有通用性,适合于任何C++。
1). 不使用成员函数,直接使用普通C函数,为了实现在C函数中可以访问类的成员变量,可以使用友元操作符(friend),在C++中将该C函数说明为类的友元即可。这种处理机制与普通的C编程中使用回调函数一样。
2). 使用静态成员函数,静态成员函数不使用this指针作为隐含参数,这样就可以作为回调函数了。静态成员函数具有两大特点:其一,可以在没有类实例的情况下使用;其二,只能访问静态成员变量和静态成员函数,不能访问非静态成员变量和非静态成员函数。由于在C++中使用类成员函数作为回调函数的目的就是为了访问所有的成员变量和成员函数,如果作不到这一点将不具有实际意义。解决的办法也很简单,就是使用一个静态类指针作为类成员,通过在类创建时初始化该静态指针,如pThis=this,然后在回调函数中通过该静态指针就可以访问所有成员变量和成员函数了。这种处理办法适用于只有一个类实例的情况,因为多个类实例将共享静态类成员和静态成员函数,这就导致静态指针指向最后创建的类实例。为了避免这种情况,可以使用回调函数的一个参数来传递this指针,从而实现数据成员共享。这种方法稍稍麻烦,这里就不再赘述。
实现不需要辅助函数实现回调非静态类成员函数
#define CLASS_MEMBER_FUNCTION_SUPPORT_CALLBACK( ThisPointerAddress ) \\
__asm mov eax , (ThisPointerAddress)\\
__asm mov [ebp-4] , eax
只是需要一个变通的方法,可以把对象指针传入该静态成员函数,一个方法是通过某个参数的形式,把this指针传入,通过该指针调用普通成员变量和函数,还有一个方法是在类里建立一个静态成员变量
class CMyClass
&leftsign;
private:
static CMyClass* m_pThis;
&rightsign;;
每次调用需要callback函数之前把该变量设为this(注意,比较危险,除非你可以肯定程序始终只有一个线程可以调用该callback函数),然后静态函数内部即可通过m_pThis访问普通成员变量和函数
利用一组宏定义实现类成员函数的回调
实现类成员函数的回调,已有方法有例如MFC的CCmdTarget类采用一组枚举来区分参数和返回值,然后用一组数组来存储对象和指针;以及使用模板来实现回调。本文讨论一种通过宏定义实现类成员函数的回调的方法。
实现它需要两个先决条件:
1.回调函数所属的类需要从已知的类继承,最好有相同的基类。例如CObject。
2.回调函数必须是public的类成员函数,不能是私有、保护或者静态的成员函数。
C++消息连接的一种系统方法
用过C++进行过面向对象程序设计的用户都知道,程序中的对象很少单独存在。不考虑对象间的相互作用几乎是不可能的。所以,标识对象间的关系或建立对象间的消息连接是面向对象程序设计的一项重要任务。本文着重从C++程序设计的角度,提出一种建立对象间消息连接的实用方法。如果你想详细了解面向对象程序设计技术,请参阅有关专著。大家都知道对象是数据和方法的封装体。在C++中,它们分别表现为数据成员和成员函数。程序设计者通过执行对象的各种方法,来改变对象的状态(即改变对象的属性数据)。从而使该对象发生某些“事件”。当一对象发生某事件时,它通常需向其它相关对象发送“消息”,请求它们作出一些处理。 这时,发生事件并向其它对象请求处理的对象被称为“事件对象”,而处理事件的对象被称为“回调对象”。回调对象对事件的处理称为“回调函数”。在C++中,这一过程相当于:当事件对象发生事件时,调用回调对象的某些成员函数。通常的作法是回调对象向事件对象传递对象指针。但这种方法不通用。为了减少程序设计的工作量,本文提出一种建立对象间消息连接的系统方法。它的思路是:将“事件发生→请求处理→执行处理”这一过程抽象成一个“回调”(CallBack)类。通过继承,用户可以轻松获取建立对象间消息连接的机制。
1221 unknow unknown device Memory Stick
昨天不知道怎么回事,将Memory Stick 卡插入读取器后,WINXP 一点反应都没有,我过去看了看,发现设备管理器中根本没有认到该设备。
显示 UNKNOWN DEVICE。
但是我的情况是
安装为 unknown device ,正常的不能再正常了,无论我怎么安装 INTEL INF,重新指定驱动程序,都告诉我 找不到更加匹配的驱动程序
重启系统;删除设备;重新 GHOST 回来系统,也是一样的效果;无论是插入 16M 还是 128M 的卡,都是一样
正常设备:
位置 0 (USB Memory Stick Slot) 通用串行总线控制器 兼容 USB 存储设备 USB MASS STORAGE DEVICE
最后的解决办法:我在读卡器上面按了几下~~~然后重新刷新硬件~~ 晕倒~~~~~~~
按照正常情况下,如果出现问题,WINDOWS应该提示:
系统发现新硬件,并表示正在安装,系统提示:跟这台计算机连接的一个usb设备运行不正常,windows无法识别。
或者
操作系统是Windows 2000简体中文专业版,正常是不需要驱动的,系统可以自动识别,但是现在在插上移动硬盘后,系统显示发现新硬件,并开始安装驱动,但是在驱动安装过程结束后,系统提示安装驱动过程中,出现了有一个错误,而后我在“设备管理器”里查看,发现在“通用串行总线控制器”下,有一项为“USB DEVICE”的,前面还有黄色叹号。很明显,这个移动硬盘虽然被系统发现,但是却不能被正确的识别,所以这个移动硬盘无法使用。在驱动安装过程中,根本没有人为的干预,却出现安装驱动错误
比较典型的一些资料
今天买了一个摄像头.首先安装光盘带的驱动,重启后.将摄像头连接到usb口(该usb口平时插u盘正常使用)。系统发现新硬件,并表示正在安装,但过一会儿系统提示:跟这台计算机连接的一个usb设备运行不正常,windows无法识别。打开设备管理器发现新增unknown.device但在属性里发现没有为该设备安装的驱动程序,让windows搜索驱动也没找到。
最简单的理由,摄像头坏了 ;重装
我将线插在USB插口处,电脑显示“发现新硬件”,接着我按照说明书的步骤一步一步安装,但是最后确出现“向导无法为您的硬件找到比现在安装的软件更匹配的软件”。烧录卡的灯也一直是红色的,启动烧录程序,但是无法使用““““`
这个是情况是你第一次安装时没有安装没成功,你把原来的驱动卸载掉。( 然后重新安装!!!记住第一次安装完以后驱动以后显示“驱动程序安装成功”,这时还没完!!!!!等一会儿,系统会提示发现新的硬件,重复刚才的新硬件安装过程!!这样才是安装成功!!
[楼主][每日必看]
添加硬件试验过了,被提示设备运转正常,下面是贴图,请高手指教
很明显从c,d,e,f是我本地硬盘,在资源管理器和磁盘管理器里找不到任何关于移动硬盘的图标,唯一可以看到的就是在设备管理器里面的unknowndevice,我尝试过用别人的hpnc7000可以马上找到,别人的台式的也可以,为什么我找不到呢,奇怪的是我可以找到另外一个紫光的移动硬盘,真是出鬼了 修改于:2004-3-23 22:2:56
在计算机管理/磁盘管理,也找不到,但是每当插上,计算机都会有提示,发现新硬件,并且最后说可以正常使用,但是就在资源管理器里找不到。。。。见下图
Memory Stick
Memory Stick,即内存棒,是一种专利技术,它是由Sony公司1997年7月与Casio、Fujitsu、 Olympus、 Sanyo和 Sharp共同开发出的一种超微体积(口香糖大小)集成化电路的数字存储介质。它是一种相当于AA电池大小的闪存卡,采用10针连接器,专门用于一系列不同的音频、视频及电脑设备之间的信息传递。
Memory Stick被很多人称为香口胶存贮卡,因为其尺寸确实像一条香口胶:50mm x 21.5mm x 0.28mm,重4克。采用精致醒目的蓝色外壳(新的MG为白色),并具有写保护开关。 Memory Stick由Sony在日本的工厂生产,但存贮单元模块却并不是由Sony自己生产的,而是由第三方厂商提供,不过Sony拒绝透露是哪一家(也许就是签了Memory Stick授权协议的TI)。
和很多Flash Memory存贮卡不同,Memory Stick规范是非公开的,没有什么标准化组织(Sony认为没有必要进行行业标准化)。这个香口胶采用了Sony自己的外型、协议、物理格式和版权保护技术,要使用它的规范就必须和Sony谈判签定许可。目前所知道的是Memory Stick也包括了控制器在内,采用10针接口,数据总线为串行,最高频率可达20MHz,电压为2.7伏到3.6伏,电流平均为45mA。可以看出这个规格和差不多同一时间出现的MMC颇为相似。
记忆棒 MSA-4A MSA-8A MSA-16A MSA-32A MSA-64A
记忆容量 4MB 8MB 16MB 32MB 64MB
外壳尺寸
(长x阔x厚) 50×21.5×2.8毫米
净重 4克
记忆类型 快闪记忆(Flash Memory)
连接器 10 针
介面 串行接口
传送率 最高 20 MHz
存取速度 写存速度;最高 1.5 MB/秒
读取速度:最高 2.45MB/秒
电压 2.7 伏特- 3.6伏特
电能消耗 平均:45mA ;备用:最高130mA
配件 记忆棒套及标签
更新记录 Update History
2005-05-07 明天上班了,今天总结一下
2005-05-01 5.1计划1、CLASS2 无线传真2、虚拟硬盘小子3、ACCESS密码破解
2005-04-29 GOOGLE基本去除了我的收录;但是我的PAGERANK居然是4了;我申请了几个GMAIL;最近开始又六年之后做传真,不过是CLASS2协议,基本DEMO出来了,不过兼容调试会比较麻烦;看到了两个没有交钱的订单,给了我老婆一点高兴 不是我自己弄的 :)。;五一看看能不能基本完善传真代码;今天评审实习生的毕业设计,头都晕了;
2005-04-21 这一阵真是多事之秋,网站这个月被停了好几次;J2EE学习陷入JSP/JSF的烦恼;LINUX 串口开发我习惯的类操作MAGIC C++似乎支持不是很好,而LINUX开发的资料缺少;网上购书又缺货和一本不合意;两个项目都要帮助别人调试;另外一个项目的开发员总是喜欢简单事情复杂化;唯一高兴的是儿子一天一天可爱了。
2005-03-24 这一阵可能要和JAVA开始打交道了,以前的一个ASP.NET项目需要移植到LINUX下
2005-03-12 上月电话费又因为我的MODEM上网欠费了,虽然给我老婆描了一个捐助的饼,可是看来又破了,我又要戒网了,得赶快再作个小软件再描一个饼~~~~~。
2005-03-07 周六周日乒乓球和排球,可能打完球喝水,有点受凉。可能以前的老毛病,一到春秋,比较阴冷的时候,肺部自己感觉就是气走不顺,容易咳嗽~
2005-03-04 上班了,部门变动很大,很多人走了,几个老弟兄也走了,我的唯一组员也走了~~~~~~~, 儿子打了预防针,发烧~~~~~~~, 传真软件进度不好, 心情很糟糕~~~~~~~, 今天把以前零零碎碎的BLOG全部整理上来了
2005-02-17 转眼就要上班了,SER232MON没有办法移植到WIN9X, 这几天写了一些软件开发的总结
2005-02-13 SKPRITN UPDATE SUPPORT WIN9X
2005-02-11 dbx2eml OK
2005-02-08 CVSTRACMAIL SQLITE基本告一段落OVER
2005-02-06 O/R MAPPING基本告一段落
O/R MAPPING(NHibernate、DevExpress.eXpress.Persistent.Objects.Net、Gentle.net)
2005-01-31 准备制作CVSTRAC
2005-01-27 B2AFM_SF 0.11
2005-01-26 B2MAILSCH 0.13
2005-01-26 B2SEE 0.04
2005-01-06 b2conmenu 0.09
标签:mem