Android Studio 提示 out of memory,该怎么解决

图片说明
如图,用一段时间后就会出现这个提示框,一旦出现只能重启Studio,很是影响工作。这个该怎么解决啊。增加 Xmx 没用

5个回答

试试菜单 FILE->INVALIDATE CACHES/RESTART 能否解决。

lcy_1514
lcy_1514 回复91program: 好的
3 年多之前 回复
91program
91program 建议使用最新版本的 Android Studio。
3 年多之前 回复

存储不够了,调试的时候清空一下工作区,把没用的东西清一下。然后在配置中多加点存储空间。我用的虚拟机都可以的……

lcy_1514
lcy_1514 你的方法对我最有效,一出现那个对话框清理下就好了,也不需要重启。只是已经采纳别人了。。。
3 年多之前 回复
lcy_1514
lcy_1514 第一条之前试过,貌似对我无效,我试试第二条的修改studio.exe.vmoptions 看看可行不
3 年多之前 回复

这应该是程序运行中占用大量内存问题

两种方法都试了,没效果,今天又出现了,唉。。。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
out of memory , 怎么解决啊 !!!
我写了一个程序(工作在图形模式下),代码大约3000多行,大小为230kb左右(有可能还要增加一些)。用tc2.0编译出现out of memory错误。用win-tc也一样,不过用win-tc似乎在接近3000行时才报错,而tc2.0在2000左右就不行了。我想请问一下各位高手有没有好的解决办法啊?我想在windows环境下工作,因此到dos下加载himem与emm386的解决办法似乎不行。我在网上查资料后发现有人介绍了将文件拆分,用工程解决这一问题的方法。但是我从来没接触过工程,一试后出了许多问题。各位请帮帮忙啊!(如果推荐用工程请推荐一些网页或书籍介绍工程方面的入门知识,谢谢!)
提示out of memory怎么回事?
现在正在写一个程序,从ftp上取图片,在界面上显示出来,点击下一张时显示下一张图片。但偶尔会出现out of memory这个错误。就在下面这句出错rn Me.picBox1.Image = _rn Bitmap.FromFile(strpath & "\" & "picture.jpg")rnrn似乎有的ftp服务器就不会,而且错误很随机。rn偶新手,望高手详解
解决Out of memory问题
解决Out of memory问题,玩游戏的童鞋遇到的问题,希望能帮到那些遇到此类问题的童鞋
android LOG 中提示Out of memory !!!!!
RT,程序运行一段时间就报Out of memory ,如下图所示rn[img=https://img-bbs.csdn.net/upload/201404/18/1397830010_608450.jpg][/img]rnrn我是这样测试的,先打开一个Activity,当然我的Activity界面比较漂亮,有用到一些图片做背景,然后再关闭这个Activity,再打开,反复的可能测试了半个小时,就报这个错误了,每一次关闭Activity的时候我调用System.gc()垃圾回收一次,不过就算是这样还是抱内存不足的错误,请教大家是什么原因!!!!测试中我打开那个Activity,不关闭,程序一直挂着都没有问题的,Activity中还建有线程更新一些图形界面之类的操作
android out of memory for surface
x86平台,android运行过程中,会随机出现如题所述问题,以下是某次的logcat:rnD/installd( 115): DexInv: --- BEGIN '/system/app/JETBoy.apk' ---rnD/dalvikvm( 395): DexOpt: load 7ms, verify 33ms, opt 0msrnD/installd( 115): DexInv: --- END '/system/app/JETBoy.apk' (success) ---rnD/JetBoy ( 390): opening jet filernD/JetBoy ( 390): opening jet file DONErnD/JetBoy ( 390): start queuing jet filernD/JetBoy ( 390): start queuing jet file DONErnD/dalvikvm( 390): GC freed 717 objects / 53848 bytes in 25msrnD/dalvikvm( 390): GC freed 68 objects / 2704 bytes in 24msrnD/dalvikvm( 390): GC freed 36 objects / 1760 bytes in 24msrnD/JetBoy ( 390): @@@ done creating view!rnD/dalvikvm( 390): GC freed 300 objects / 16344 bytes in 24msrnD/dalvikvm( 390): GC freed 23 objects / 912 bytes in 20msrnI/ActivityManager( 130): Displayed activity com.example.android.jetboy/.JetBoy: 1313 ms (total 1313 ms)rnE/JET_JNI ( 390): android_media_JetPlayer_pause(): failed to pause with EAS error code -31rnE/SurfaceComposerClient( 130): openGlobalTransaction() called more than once. skipping.rnE/SurfaceComposerClient( 130): Not in transaction (client=0x8c6ded0, SurfaceID=0, mTransactionOpen=0rnW/WindowManager( 130): Error updating surface in Windowb074a9d8 com.example.android.jetboy/com.example.android.jetboy.JetBoy paused=falsernW/WindowManager( 130): java.lang.IllegalArgumentExceptionrnW/WindowManager( 130): at android.view.Surface.setAlpha(Native Method)rnW/WindowManager( 130): at com.android.server.WindowManagerService.performLayoutAndPlaceSurfacesLockedInner(WindowManagerService.java:10186)rnW/WindowManager( 130): at com.android.server.WindowManagerService.performLayoutAndPlaceSurfacesLocked(WindowManagerService.java:9256)rnW/WindowManager( 130): at com.android.server.WindowManagerService.finishDrawingWindow(WindowManagerService.java:2540)rnW/WindowManager( 130): at com.android.server.WindowManagerService$Session.finishDrawing(WindowManagerService.java:6709)rnW/WindowManager( 130): at android.view.IWindowSession$Stub.onTransact(IWindowSession.java:212)rnW/WindowManager( 130): at com.android.server.WindowManagerService$Session.onTransact(WindowManagerService.java:6648)rnW/WindowManager( 130): at android.os.Binder.execTransact(Binder.java:287)rnW/WindowManager( 130): at com.android.server.SystemServer.init1(Native Method)rnW/WindowManager( 130): at com.android.server.SystemServer.main(SystemServer.java:497)rnW/WindowManager( 130): at java.lang.reflect.Method.invokeNative(Native Method)rnW/WindowManager( 130): at java.lang.reflect.Method.invoke(Method.java:521)rnW/WindowManager( 130): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)rnW/WindowManager( 130): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)rnW/WindowManager( 130): at dalvik.system.NativeStart.main(Native Method)rnI/WindowManager( 130): Out of memory for surface! Looking for leaks...rnW/WindowManager( 130): LEAKED SURFACE (app token hidden): Windowb073a9d8 com.android.internal.service.wallpaper.ImageWallpaper paused=false surface=Surface(native-token=1470rnW/WindowManager( 130): LEAKED SURFACE (app token hidden): Windowb06b95e0 com.android.launcher/com.android.launcher.Launcher paused=false surface=Surface(native-token=1472204rnW/WindowManager( 130): LEAKED SURFACE (app token hidden): Windowb0765bf8 SurfaceView paused=false surface=Surface(native-token=147874072) token=AppWindowTokenb0839438 tokenrnE/Surface ( 390): error dequeuing a buffer (Unknown error: -19)rnE/Surface ( 390): dequeueBuffer failed (No such device)rnE/SurfaceHolder( 390): Exception locking surfacernE/SurfaceHolder( 390): java.lang.IllegalArgumentExceptionrnE/SurfaceHolder( 390): at android.view.Surface.lockCanvasNative(Native Method)rnE/SurfaceHolder( 390): at android.view.Surface.lockCanvas(Surface.java:288)rnE/SurfaceHolder( 390): at android.view.SurfaceView$2.internalLockCanvas(SurfaceView.java:680)rnE/SurfaceHolder( 390): at android.view.SurfaceView$2.lockCanvas(SurfaceView.java:663)rnE/SurfaceHolder( 390): at com.example.android.jetboy.JetBoyView$JetBoyThread.run(JetBoyView.java:663)rnW/WindowManager( 130): LEAKED SURFACE (app token hidden): Windowb074a9d8 com.example.android.jetboy/com.example.android.jetboy.JetBoy paused=false surface=Surface(native-tokrnW/WindowManager( 130): LEAKED SURFACE (app token hidden): Windowb06510c8 StatusBarExpanded paused=false surface=Surface(native-token=147019560) token=AppWindowTokenb0839438rnW/WindowManager( 130): LEAKED SURFACE (app token hidden): Windowb076f740 StatusBar paused=false surface=Surface(native-token=145184728) token=AppWindowTokenb0839438 token=HrnW/WindowManager( 130): Looks like we have reclaimed some memory, clearing surface for retry.rnW/WindowManager( 130): Due to memory failure, waiting a bit for next layoutrnW/dalvikvm( 390): threadid=19: thread exiting with uncaught exception (group=0xb6044c50)rnE/AndroidRuntime( 390): Uncaught handler: thread Thread-8 exiting due to uncaught exceptionrnE/AndroidRuntime( 390): java.lang.NullPointerExceptionrnE/AndroidRuntime( 390): at com.example.android.jetboy.JetBoyView$JetBoyThread.doDrawReady(JetBoyView.java:609)rnE/AndroidRuntime( 390): at com.example.android.jetboy.JetBoyView$JetBoyThread.doDraw(JetBoyView.java:483)rnE/AndroidRuntime( 390): at com.example.android.jetboy.JetBoyView$JetBoyThread.run(JetBoyView.java:665)rnI/Process ( 130): Sending signal. PID: 390 SIG: 3rnE/ActivityThread( 130): Failed to find provider info for android.server.checkinrnE/Checkin ( 130): Error reporting crash: java.lang.IllegalArgumentException: Unknown URL content://android.server.checkin/crashesrnI/dalvikvm( 390): threadid=7: reacting to signal 3rnI/dalvikvm( 390): Wrote stack trace to '/data/anr/traces.txt'rnE/Surface ( 211): surface (id=0, identity=67) is invalid, err=-19 (No such device)rnE/Surface ( 211): dequeueBuffer failed (No such device)rnE/ViewRoot( 211): IllegalArgumentException locking surfacernE/ViewRoot( 211): java.lang.IllegalArgumentExceptionrnE/ViewRoot( 211): at android.view.Surface.lockCanvasNative(Native Method)rnE/ViewRoot( 211): at android.view.Surface.lockCanvas(Surface.java:288)rnE/ViewRoot( 211): at android.view.ViewRoot.draw(ViewRoot.java:1283)rnE/ViewRoot( 211): at android.view.ViewRoot.performTraversals(ViewRoot.java:1114)rnE/ViewRoot( 211): at android.view.ViewRoot.handleMessage(ViewRoot.java:1633)rnE/ViewRoot( 211): at android.os.Handler.dispatchMessage(Handler.java:99)rnE/ViewRoot( 211): at android.os.Looper.loop(Looper.java:123)rnE/ViewRoot( 211): at android.app.ActivityThread.main(ActivityThread.java:4363)rnE/ViewRoot( 211): at java.lang.reflect.Method.invokeNative(Native Method)rnE/ViewRoot( 211): at java.lang.reflect.Method.invoke(Method.java:521)rnE/ViewRoot( 211): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)rnE/ViewRoot( 211): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)rnE/ViewRoot( 211): at dalvik.system.NativeStart.main(Native Method)rnI/Process ( 390): Sending signal. PID: 390 SIG: 9rnrn出现该问题后,android的壁纸和statusbar都消失,home背景变黑。各位大侠帮忙看看,问题可能处在什么地方,谢谢!
提示Out of memory 和insufficent memory to continue,内存不足
我的数据窗口中,试过用FOR ....NEXT和DO WHILE ....LOOT做3万多次循环,均提示Out of memory 和Insufficent memory to continue,问题出在哪里了?是不是一次执行的代码循环不能超过一定的次数?在PB代码执行过程中,内存空间如何释放出来?
socketconnection提示out of memory,怎么办?
socketconnection提示out of memory,怎么办?
C6678提示out of memory的解决方法
本人使用的TI公司生产的KeyStone结构的C6000系列的八核DSP——C6678,在程序运行时总是会在console界面输出提示:ti.sysbios.heaps.HeapMem: line 307: out of memory: handle=0x828f58, size=3572.如图所示。                                         经过查找原...
应用程序整天都 Out of Memory 怎么解决?
一个ASP.Net的应用程序,经常都在打开页面时或者检索数据时提示错误“Out of Memory”,此时进入服务器查看内存使用情况,服务器内存其实还有很多没有分配,应该是够用的。查看进程,aspnet_wp.exe占用大概700MB的内存,把它给终止掉以后该错误提示就没有了,但是过大半天后错误提示又出来了。rnrn请问这个问题该怎么解决?不可能整天都跑去中止aspnet_wp.exe进程吧。
这个out of memory错误怎么解决?
.model smallrn .code rn ORG 100rnBEGIN: JMP MAINrnCHAR DB 'ABCDEFG','$' ;定义字符串rnMAIN PROC FARrn LEA DI,CHAR ;保存字符串的地址rn MOV CX,7 ;字符个数rn MOV AH,02HrnPRINT: rn MOV DL,[DI] ;循环显示7个字符rn INT 21Hrn INC DIrn LOOP PRINTrn rn MOV AX,4C00H ;结束程序rn INT 21HrnMAIN ENDP rnEND BEGINrnrnrnrn1.asm<7>:out of memory
ORA-27102: out of memory 解决实例
最开始一次给客户做优化设置的时候,出现过一个这样的错,那时候没有经验,数据库怎么都起不来,自己吓得不行了,回来幸好找到一个有经验的前辈,才得以解决。rnrn时间几年过去了,再也没有发生,这几天忽然想起一起那次的事,不由的想把当时的情况模拟出来,自己来处理一次叻。rnrn问题是怎么出现的,rnrn首先在32位机器上,配置sga的内存超过1.5G,基本上就出现这个问题叻rnrn这里还有一点要知道,sga_max_size可以自动来变动的,当sga的内存组件的和小于sga_max_size的时候,sga_max_size不会改变,还是维持自己的值,如果超过了这个和,sga_max_size的就会自动变动成和的值,这个你可以自己试试。rnrn看看我的内存情况rnrnTotal System Global Area 965812724 bytesrnrnFixed Size 455156 bytesrnrnVariable Size 251658240 bytesrnrnDatabase Buffers 713031680 bytesrnrnRedo Buffers 667648 bytesrnrn这是我的windowxp上的实例,rnrn我现在想调整database buffer的值到1G,我只需要设置db_cache_size到1G,而不设置sga_max_size,这时由于各组件值大于sga_max_size目前值,所以sga_max_size自动变化。rnrnSQL>alter system set db_cache_size=1000M scope=spfile;rnrnSQL> shutdown immediate;rnrnSQL> startup;rnrn看看现在的内存信息rnrnTotal System Global Area 1301357848 bytesrnrnFixed Size 455960 bytesrnrnVariable Size 251658240 bytesrnrnDatabase Buffers 1048576000 bytesrnrnRedo Buffers 667648 bytesrnrn发现sga_max_size已经自动变化rnrnSQL> show parameters sga_rnrnNAME TYPE VALUErnrn———————————— ——————————— ———rnrnsga_max_size big integer 130135784rnrn也已经变化叻。rnrn rnrn现在模拟我们的问题吧rnrn不过模拟前,先把我们的init.Ora备份一下,不备份init.Ora当然也不可以不过,等下恢复设置的东西太多,麻烦。rnrn先把我们调整内存钱的parameter备份一下吧rnrnSQL>create pfile=’F:\Synchrophy\Server\oracle\admin\ORA9i\pfile\init.bak.ora’ from spfile;rnrn这句话就是把你的spfile备份到pfile文件里,由于spfile是二进制的文件,不好修改,所以我们一般用这样的形式来备份。rnrn备份好。我们可以放心的改我们的内存叻rnrnSQL> alter system set db_cache_size=1500M scope=spfile;rnrnSQL> shutdown immediate;rnrnSQL> startup;rnrn现在问题出现了吧rnrn一起看看rnrnORA-27102: out of memoryrnrnOSD-00022: Message 22 not found; product=RDBMS; facility=SOSDrnrnO/S-Error: (OS Not enough storage is available to process this command.rnrn为什么会出现这样的问题叻,是因为在32位的机器上Oracle的内存有限制,内存最大4G,32位留50%给操作系统,window是单线程的,不能超过1.7G。out of memory也就出来叻。rnrn那么碰到这个问题我们如何解决了。如果了解Oracle的init的启动的话,做这个恢复就比较简单了,默认oralce是从spfile先启动的,rnrn你可以这样查到路径rnrnSQL> show parameter pfilernrn rnrnNAME TYPE VALUErnrn———————————— ———– ——————————rnrnspfile string %ORACLE_HOME%\DATABASE\SPFILE%rnrn ORACLE_SID%.ORArnrn所以你先在可以通过修改这个文件里的相关参数的值来恢复,不过修复的时候注意,这是个二进制文件,要保持二进制的格式。rnrn还有方法用我们刚才的pfile来恢复。rnrnSQL>startup pfile=’你备份的init.ora’;rnrn如果在window下,需要rnrnSQL>create spfile from pfile=’你备份的init.ora’;rnrn重启服务,即可。
解决Tomcat的“Out Of Memory”内存溢出
  如果在项目中用到了spring和hibernate并且数据量比较大的情况下,系统有时会突然出现“Out Of Memory”内存溢出的问题!可以试试下面的解决方案,如果机器配置比较好还可以适当加大点配置!     在netbeans安装的tomcat下的bin目录的catalina.bat文件下找到这行: Java代码   echo Using CATALINA_B...
out of Memory
有没有国庆的时候同LZ一样在悲催加班的大虾,能不能帮我看下一下程序:在TMyThread中把文本文件通过StringList在StringGrid中显示。当文本文件有600000行的时候,在导入到40%左右的时候就提示:Projece ss.exe raised exception class EOutOfMemory with message 'Out of memory'。大虾们能不能帮我看下是什么原因。rnrnrnprocedure TMyThread.Execute;rnvarrntmpList:TStringList;rn index,row:Integer;rn originalrow:integer;rn repeatcount:integer;rnbeginrnFreeOnTerminate := True; 这可以让线程执行完毕后随即释放rn if NewMsgBox.OpenDialog1.Execute then//选择文本文件rn beginrn tmpList:=TStringList.Create;//初始化StringListrn tmpList.LoadFromFile(NewMsgBox.OpenDialog1.FileName);//导入文本文件到StringListrn if tmpList.Count=0 then //文本文件为空 则退出rn beginrn exit;rn endrn elsern beginrn row:=NewMsgBox.PhoneGrid.RowCount;rn NewMsgBox.PhoneGrid.RowCount:=NewMsgBox.PhoneGrid.RowCount+tmpList.Count;rn for index:=0 to tmpList.Count-1 do //把TstringList的内容写入PhoneGrid PhoneGrid为StringGridrn beginrn NewMsgBox.PhoneGrid.Cells[0,row]:=tmpList[index];rn row:=row+1;rn waitplease.Gauge1.Progress:=waitplease.Gauge1.Progress+1;rn end;rn end;rn tmpList.Free;rnrn end;rnrnrnend;
out of memory
我初学ORACLE,利用DBCA建立数据库时到50%的时候提示:“OUT OF MEMORY”,我的内存为1GB。怎么办??
Out of memory
Out of memory,insufficient memory to continue.
out of memory。。。。
一个小游戏,第一次运行的时候正常,然后点击图标第二次运行,报错:rn...rn...rn03-24 09:52:08.366: E/dalvikvm-heap(414): 1075200-byte external allocation too large for this process.rn03-24 09:52:08.366: E/GraphicsJNI(414): VM won't let us allocate 1075200 bytesrn03-24 09:52:08.385: D/AndroidRuntime(414): Shutting down VMrn03-24 09:52:08.385: W/dalvikvm(414): threadid=1: thread exiting with uncaught exception (group=0x4001d800)rn03-24 09:52:08.426: E/AndroidRuntime(414): FATAL EXCEPTION: mainrn03-24 09:52:08.426: E/AndroidRuntime(414): java.lang.OutOfMemoryError: bitmap size exceeds VM budgetrn03-24 09:52:08.426: E/AndroidRuntime(414): at android.graphics.Bitmap.nativeCreate(Native Method)rn03-24 09:52:08.426: E/AndroidRuntime(414): at android.graphics.Bitmap.createBitmap(Bitmap.java:468)rn03-24 09:52:08.426: E/AndroidRuntime(414): at android.graphics.Bitmap.createBitmap(Bitmap.java:435)rn03-24 09:52:08.426: E/AndroidRuntime(414): at hxy.components.Pic.resetBmp(Pic.java:197)rn03-24 09:52:08.426: E/AndroidRuntime(414): at hxy.components.Pic.loadManagerBmps(Pic.java:94)rn03-24 09:52:08.426: E/AndroidRuntime(414): at hxy.cButton.cButton.addPic(cButton.java:134)rn...rn...rnrn然后再次点击图标运行,又正常。如此循环....囧rz 这是怎么回事呢?该怎么解决呢?bow~~
Out of memory?
在软件运行的时候由于有非常大的数据最后导致Out of memory!请问有什么好的方法或技术解决这个问题?
Out of Memory
这个问题实在是太纠结了,因为这个问题他不是每次都出来,有时候会报出这个问题,有时候又不会。rn不知道如何去查找到底是哪里导致的这个问题,还有如何去解决这个问题。rn不要回答我说什么内存不够,增加内存等。rn这个应该是程序上的问题,只是不知怎么去寻找问题发生在哪里。rn谢谢
out of memory!
我的jbuilder在调试的时候经常出现 out of memory!这是什么原因,怎样解决!rn谢谢、
Out of memory?!
rnrnrn 只是一个很小的程序,运行masm后竟然告诉我Out of memory,请大家指点!
请教mysql报错,提示Out of memory
Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap spacern表引擎都是myisamrnrnrn下面是my.inirn# MySQL Server Instance Configuration Filern# ----------------------------------------------------------------------rn# Generated by the MySQL Server Instance Configuration Wizardrn#rn#rn# Installation Instructionsrn# ----------------------------------------------------------------------rn#rn# On Linux you can copy this file to /etc/my.cnf to set global options,rn# mysql-data-dir/my.cnf to set server-specific optionsrn# (@localstatedir@ for this installation) or torn# ~/.my.cnf to set user-specific options.rn#rn# On Windows you should keep this file in the installation directory rn# of your server (e.g. C:\Program Files\MySQL\MySQL Server X.Y). Torn# make sure the server reads the config file use the startup option rn# "--defaults-file". rn#rn# To run run the server from the command line, execute this in a rn# command line shell, e.g.rn# mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"rn#rn# To install the server as a Windows service manually, execute this in a rn# command line shell, e.g.rn# mysqld --install MySQLXY --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"rn#rn# And then execute this in a command line shell to start the server, e.g.rn# net start MySQLXYrn#rn#rn# Guildlines for editing this filern# ----------------------------------------------------------------------rn#rn# In this file, you can use all long options that the program supports.rn# If you want to know the options a program supports, start the programrn# with the "--help" option.rn#rn# More detailed information about the individual options can also bern# found in the manual.rn#rn#rn# CLIENT SECTIONrn# ----------------------------------------------------------------------rn#rn# The following options will be read by MySQL client applications.rn# Note that only client applications shipped by MySQL are guaranteedrn# to read this section. If you want your own MySQL client program torn# honor these values, you need to specify it as an option during thern# MySQL client library initialization.rn#rn[client]rnrnport=3306rnrn[mysql]rnrndefault-character-set=utf8rnrnrn# SERVER SECTIONrn# ----------------------------------------------------------------------rn#rn# The following options will be read by the MySQL Server. Make sure thatrn# you have installed the server correctly (see above) so it reads this rn# file.rn#rn[mysqld]rnrn# The TCP/IP Port the MySQL Server will listen onrnport=3306rnrnrn#Path to installation directory. All paths are usually resolved relative to this.rnbasedir="D:/mysql/"rnrn#Path to the database rootrndatadir="D:/mysql/Data/"rnrn# The default character set that will be used when a new schema or table isrn# created and no character set is definedrndefault-character-set=utf8rnrn# The default storage engine that will be used when create new tables whenrndefault-storage-engine=MYISAMrnrn# Set the SQL mode to strictrnsql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"rnrn# The maximum amount of concurrent sessions the MySQL server willrn# allow. One of these connections will be reserved for a user withrn# SUPER privileges to allow the administrator to login even if thern# connection limit has been reached.rnmax_connections=1210rnrn# Query cache is used to cache SELECT results and later return themrn# without actual executing the same query once again. Having the queryrn# cache enabled may result in significant speed improvements, if yourrn# have a lot of identical queries and rarely changing tables. See thern# "Qcache_lowmem_prunes" status variable to check if the current valuern# is high enough for your load.rn# Note: In case your tables change very often or if your queries arern# textually different every time, the query cache may result in arn# slowdown instead of a performance improvement.rnquery_cache_size=175Mrnrn# The number of open tables for all threads. Increasing this valuern# increases the number of file descriptors that mysqld requires.rn# Therefore you have to make sure to set the amount of open filesrn# allowed to at least 4096 in the variable "open-files-limit" inrn# section [mysqld_safe]rntable_cache=2420rnrn# Maximum size for internal (in-memory) temporary tables. If a tablern# grows larger than this value, it is automatically converted to diskrn# based table This limitation is for a single table. There can be manyrn# of them.rntmp_table_size=39Mrnrnrn# How many threads we should keep in a cache for reuse. When a clientrn# disconnects, the client's threads are put in the cache if there aren'trn# more than thread_cache_size threads from before. This greatly reducesrn# the amount of thread creations needed if you have a lot of newrn# connections. (Normally this doesn't give a notable performancern# improvement if you have a good thread implementation.)rnthread_cache_size=60rnrn#*** MyISAM Specific optionsrnrn# The maximum size of the temporary file MySQL is allowed to use whilern# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.rn# If the file-size would be bigger than this, the index will be createdrn# through the key cache (which is slower).rnmyisam_max_sort_file_size=100Grnrn# If the temporary file used for fast index creation would be biggerrn# than using the key cache by the amount specified here, then prefer thern# key cache method. This is mainly used to force long character keys inrn# large tables to use the slower key cache method to create the index.rnmyisam_sort_buffer_size=39Mrnrn# Size of the Key Buffer, used to cache index blocks for MyISAM tables.rn# Do not set it larger than 30% of your available memory, as some memoryrn# is also required by the OS to cache rows. Even if you're not usingrn# MyISAM tables, you should still set it to 8-64M as it will also bern# used for internal temporary disk tables.rnkey_buffer_size=541Mrnrn# Size of the buffer used for doing full table scans of MyISAM tables.rn# Allocated per thread, if a full scan is needed.rnread_buffer_size=64Krnread_rnd_buffer_size=256Krnrn# This buffer is allocated when MySQL needs to rebuild the index inrn# REPAIR, OPTIMZE, ALTER table statements as well as in LOAD DATA INFILErn# into an empty table. It is allocated per thread so be careful withrn# large settings.rnsort_buffer_size=256Krnrnrn#*** INNODB Specific options ***rnrnrn# Use this option if you have a MySQL server with InnoDB support enabledrn# but you do not plan to use it. This will save memory and disk spacern# and speed up some things.rn#skip-innodbrnrn# Additional memory pool that is used by InnoDB to store metadatarn# information. If InnoDB requires more memory for this purpose it willrn# start to allocate it from the OS. As this is fast enough on mostrn# recent operating systems, you normally do not need to change thisrn# value. SHOW INNODB STATUS will display the current amount used.rninnodb_additional_mem_pool_size=2Mrnrn# If set to 1, InnoDB will flush (fsync) the transaction logs to thern# disk at each commit, which offers full ACID behavior. If you arern# willing to compromise this safety, and you are running smallrn# transactions, you may set this to 0 or 2 to reduce disk I/O to thern# logs. Value 0 means that the log is only written to the log file andrn# the log file flushed to disk approximately once per second. Value 2rn# means the log is written to the log file at each commit, but the logrn# file is only flushed to disk approximately once per second.rninnodb_flush_log_at_trx_commit=1rnrn# The size of the buffer InnoDB uses for buffering log data. As soon asrn# it is full, InnoDB will have to flush it to disk. As it is flushedrn# once per second anyway, it does not make sense to have it very largern# (even with long transactions).rninnodb_log_buffer_size=1Mrnrn# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes andrn# row data. The bigger you set this the less disk I/O is needed torn# access data in tables. On a dedicated database server you may set thisrn# parameter up to 80% of the machine physical memory size. Do not set itrn# too large, though, because competition of the physical memory mayrn# cause paging in the operating system. Note that on 32bit systems yourn# might be limited to 2-3.5G of user level memory per process, so do notrn# set it too high.rninnodb_buffer_pool_size=8Mrnrn# Size of each log file in a log group. You should set the combined sizern# of log files to about 25%-100% of your buffer pool size to avoidrn# unneeded buffer pool flush activity on log file overwrite. However,rn# note that a larger logfile size will increase the time needed for thern# recovery process.rninnodb_log_file_size=10Mrnrn# Number of threads allowed inside the InnoDB kernel. The optimal valuern# depends highly on the application, hardware as well as the OSrn# scheduler properties. A too high value may lead to thread thrashing.rninnodb_thread_concurrency=10rn
在pb6.5中用ole控件,提示out of memory, 如何解决?
是不是和其他程序有冲突?
解决PHPExcel导出大数据提示out memory错误
问题描述: 错误提示:Fatal error: Allowed memory size of 134217728 bytes exhausted 问题原因: 1. php.ini文件中memory_limit值设置太小,php脚本执行所需要的内存不够 2. excel表格一个工作薄最多支持65535行数据量,要导出到一个工作薄的数据量超过65535行
请教:vb编译时提示Out of Memory!怎么办
我的程式引用了一个类工程,每次编译到写文件时提示out of memory,硬件无问题后来在WIN2000下编译通过,请问各位有什么好的检测办法!
oracle数据库经常提示27102 out of memory解决方法
网上有很多解决方案,但是我一个也看不懂,不知道写的什么鬼的东西,为什么一句话就能解决的事,非得长篇大论说原理是什么,看得一脸懵逼 我的解决方法入戏 vi /etc/sysctl.conf 修改kernel.shmall(共享内存总量)的值,该值原来为2097152,我把它给为4097152(暂时不知道应该改什么值,但是把这个值变大就对了,我就是随便吧第一位的2改为4,然后问题就自动解决)了,...
qt 使用release编译提示out of memory 怎么设置一下?
用release方式编译程序,想打包发布。 可当编译到一个源文件时就提示 out of memory allocating 20479bytes 这个怎么处理一下呢? 编译其它的源文件时都没问题,就是这个源文件有点大,近两万行![img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/35.gif][/img]
奇怪!如何解决这个"Out of memory"错误?
使用 ADO2.5 查询Access数据库时,当记录数特别多时(>60000),查询rnselect * from table_name where field_name like '%aaa%'rn时,如果字段是Memo类型的,几秒钟后就弹出"Out of memory"错误,但我的内存是256M的,请问应如何解决?
如何解决asp out of memory的问题?
Technical Information (for support personnel)rnrnError Type:rnMicrosoft VBScript compilation (0x800A03E9)rnOut of memoryrnrnrn-----------------------rn请问这个错误发生的原因是什么?如何在程序中解决这个问题。rn这个错误好像不是经常发生,但一发生就的重启iis,很麻烦,请问有没有不rn重启iis解决的方法?
提示该错误,怎么解决?
在window shell下使用git submodule update --init命令后提示:nnfatal: Not a git repository (or any of the parent directories): .git
kern.log out of memory 高手才能解决
运行着的机器,突然某一天死机,查看日志后看到这些信息。[code=c]Sep 8 18:12:02 administrior-desktop kernel: [201869.997698] __ratelimit: 27 callbacks suppressedrnSep 8 18:12:07 administrior-desktop kernel: [201869.997702] ZR_HVRCE_WATCH invoked oom-killer: gfp_mask=0xd0, order=1, oom_adj=0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997705] ZR_HVRCE_WATCH cpuset=/ mems_allowed=0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997708] Pid: 2933, comm: ZR_HVRCE_WATCH Not tainted 2.6.32-28-generic #55-UbunturnSep 8 18:12:07 administrior-desktop kernel: [201869.997710] Call Trace:rnSep 8 18:12:07 administrior-desktop kernel: [201869.997717] [] oom_kill_process+0xa4/0x2b0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997721] [] ? select_bad_process+0xa9/0xe0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997724] [] __out_of_memory+0x51/0xa0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997727] [] out_of_memory+0x58/0xb0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997731] [] __alloc_pages_slowpath+0x487/0x4a0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997734] [] __alloc_pages_nodemask+0x13a/0x170rnSep 8 18:12:07 administrior-desktop kernel: [201869.997737] [] __get_free_pages+0x1c/0x30rnSep 8 18:12:07 administrior-desktop kernel: [201869.997741] [] dup_task_struct+0x3d/0x120rnSep 8 18:12:07 administrior-desktop kernel: [201869.997743] [] copy_process+0x88/0xc20rnSep 8 18:12:07 administrior-desktop kernel: [201869.997747] [] ? alloc_pipe_info+0x25/0xb0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997749] [] ? get_empty_filp+0xcf/0x1c0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997752] [] do_fork+0x83/0x3a0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997756] [] ? do_pipe_flags+0xaf/0x110rnSep 8 18:12:07 administrior-desktop kernel: [201869.997759] [] ? copy_to_user+0x39/0x130rnSep 8 18:12:07 administrior-desktop kernel: [201869.997762] [] sys_clone+0x39/0x50rnSep 8 18:12:07 administrior-desktop kernel: [201869.997764] [] syscall_call+0x7/0xbrnSep 8 18:12:07 administrior-desktop kernel: [201869.997766] Mem-Info:rnSep 8 18:12:07 administrior-desktop kernel: [201869.997767] DMA per-cpu:rnSep 8 18:12:07 administrior-desktop kernel: [201869.997769] CPU 0: hi: 0, btch: 1 usd: 0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997771] CPU 1: hi: 0, btch: 1 usd: 0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997772] CPU 2: hi: 0, btch: 1 usd: 0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997774] CPU 3: hi: 0, btch: 1 usd: 0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997775] Normal per-cpu:rnSep 8 18:12:07 administrior-desktop kernel: [201869.997777] CPU 0: hi: 186, btch: 31 usd: 30rnSep 8 18:12:07 administrior-desktop kernel: [201869.997778] CPU 1: hi: 186, btch: 31 usd: 0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997780] CPU 2: hi: 186, btch: 31 usd: 0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997781] CPU 3: hi: 186, btch: 31 usd: 0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997783] HighMem per-cpu:rnSep 8 18:12:07 administrior-desktop kernel: [201869.997784] CPU 0: hi: 186, btch: 31 usd: 28rnSep 8 18:12:07 administrior-desktop kernel: [201869.997786] CPU 1: hi: 186, btch: 31 usd: 0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997787] CPU 2: hi: 186, btch: 31 usd: 0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997789] CPU 3: hi: 186, btch: 31 usd: 0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997792] active_anon:173859 inactive_anon:48532 isolated_anon:0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997793] active_file:7751 inactive_file:105247 isolated_file:0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997794] unevictable:0 dirty:0 writeback:67 unstable:0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997795] free:332753 slab_reclaimable:3016 slab_unreclaimable:198786rnSep 8 18:12:07 administrior-desktop kernel: [201869.997795] mapped:2157 shmem:12 pagetables:1693 bounce:0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997801] DMA free:3508kB min:64kB low:80kB high:96kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15784kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:0kB slab_unreclaimable:4960kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? nornSep 8 18:12:07 administrior-desktop kernel: [201869.997804] lowmem_reserve[]: 0 863 3449 3449rnSep 8 18:12:07 administrior-desktop kernel: [201869.997811] Normal free:9196kB min:3724kB low:4652kB high:5584kB active_anon:0kB inactive_anon:0kB active_file:112kB inactive_file:48kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:883896kB mlocked:0kB dirty:0kB writeback:0kB mapped:4kB shmem:0kB slab_reclaimable:12064kB slab_unreclaimable:790184kB kernel_stack:2504kB pagetables:52kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:111 all_unreclaimable? nornSep 8 18:12:07 administrior-desktop kernel: [201869.997815] lowmem_reserve[]: 0 0 20692 20692rnSep 8 18:12:07 administrior-desktop kernel: [201869.997821] HighMem free:1318308kB min:512kB low:3300kB high:6092kB active_anon:695436kB inactive_anon:194128kB active_file:30892kB inactive_file:420940kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:2648580kB mlocked:0kB dirty:0kB writeback:268kB mapped:8624kB shmem:48kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:6720kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? nornSep 8 18:12:07 administrior-desktop kernel: [201869.997825] lowmem_reserve[]: 0 0 0 0rnSep 8 18:12:07 administrior-desktop kernel: [201869.997828] DMA: 3*4kB 3*8kB 3*16kB 3*32kB 4*64kB 2*128kB 3*256kB 0*512kB 0*1024kB 1*2048kB 0*4096kB = 3508kBrnSep 8 18:12:07 administrior-desktop kernel: [201869.997837] Normal: 1843*4kB 138*8kB 1*16kB 12*32kB 3*64kB 1*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 9196kBrnSep 8 18:12:07 administrior-desktop kernel: [201869.997844] HighMem: 201*4kB 1463*8kB 14222*16kB 19706*32kB 5823*64kB 547*128kB 14*256kB 3*512kB 0*1024kB 0*2048kB 0*4096kB = 1318460kBrnSep 8 18:12:07 administrior-desktop kernel: [201869.997853] 113434 total pagecache pagesrnSep 8 18:12:07 administrior-desktop kernel: [201869.997854] 376 pages in swap cachernSep 8 18:12:07 administrior-desktop kernel: [201869.997856] Swap cache stats: add 92374, delete 91998, find 28664/30939rnSep 8 18:12:07 administrior-desktop kernel: [201869.997858] Free swap = 1738696kBrnSep 8 18:12:07 administrior-desktop kernel: [201869.997859] Total swap = 1951736kBrnSep 8 18:12:07 administrior-desktop kernel: [201870.005558] 895657 pages RAMrnSep 8 18:12:07 administrior-desktop kernel: [201870.005560] 668347 pages HighMemrnSep 8 18:12:07 administrior-desktop kernel: [201870.005561] 15102 pages reservedrnSep 8 18:12:07 administrior-desktop kernel: [201870.005562] 132621 pages sharedrnSep 8 18:12:07 administrior-desktop kernel: [201870.005563] 452971 pages non-sharedrnSep 8 18:12:07 administrior-desktop kernel: [201870.005566] Out of memory: kill process 2933 (ZR_HVRCE_WATCH) score 18366 or a childrnSep 8 18:12:07 administrior-desktop kernel: [201870.005569] Killed process 16702 (ZR_HVRCE_MAIN)rnSep 8 18:12:07 administrior-desktop kernel: [201870.132295] rsyslogd invoked oom-killer: gfp_mask=0xd0, order=1, oom_adj=0rnSep 8 18:12:07 administrior-desktop kernel: [201870.132305] rsyslogd cpuset=/ mems_allowed=0rnSep 8 18:12:07 administrior-desktop kernel: [201870.132312] Pid: 947, comm: rsyslogd Not tainted 2.6.32-28-generic #55-UbunturnSep 8 18:12:07 administrior-desktop kernel: [201870.132317] Call Trace:rn[/code]rn不太清楚OOM_killer杀死进程的机制是什么,我看了一些资料,/proc/[pid]/oom_score中记录着优先级别,score越大的,在系统资源临近枯竭时首先被杀死。rn本人有几个疑点:rn1. 从日志分析来看,出现Out of memory: kill process 2933 (ZR_HVRCE_WATCH) score 18366 or a child这句话后,进程并没有被杀死。是否直到出现Killed process 2933才表示该进程被杀死。rn2. HighMem free:1318308kB present:2648580kB还有1G多的内存可用,为什么会out of memory呢?rn最后我的系统是ubuntu10.04rn还请高手帮忙!!!rn不胜感激!rn就剩这么点分了,全送出去了,有点对不起大家[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/1.gif][/img]
急!如何解决 out of environment memory问题?
小弟安装 JSWDK 是按照书上说的做了,也把初始内存改为了 4096了,可是在 WIN98 中双击 startserver.bat是还是提示 out of environment space,在DOS下到是不提示了,可是 出现一下字符:rnrnusing classpath:.\classs;.\webserver.jar;.\lib\还有很多,共有3行。就是不出现正确的结果。同时还弹出一个窗口,一闪就过去了。请问各位是出来什么问题???还应该做什么。rnrnrn小弟是出学, 真 TNND,按照书上说的话,无论配什么都不能一遍成功,又没钱多买几本书。rnrnrn谢rnrn
Bitmap的处理 解决out of memory的一些问题
直接上程序 思想是 先使用软引用  也就是把图片保存在内存之中 用到时候先去找 找不到再从路径加载 有个独立的释放函数 如果不用了 请记得调用释放函数 public class DoBitmap { private static HashMap> bitmapCache = new HashMap>(); public static Bitmap loadBi
请问RLINK32: Out of memory!有没有办法解决??
小弟在链接资源文件的时候出现[Linker Fatal Error] RLINK32: Out of memory!的错误,那个资源文件有275M,请问大侠这个问题有办法解决吗??
一个oom(out of memory)问题的定位和“”解决“”
先说下背景: 主调模块有n台机器, 被调模块有6台机器(均衡地提供服务), 他们之间是网络调用。 而且, 被调模块在收到主调模块的网络包后, 先立即回一个响应给主调模块, 然后做自己的事情。 从去年到今年, 一直有个告警, 差不多每两个星期会遇到一次, 主调的log显示, 调用被调机器时超时, 而且每次根据log分析, 都是集中在某一台被...
出现out of memory错误,怎样解决?
汇编程序中出现cmp,jz;jmp 等转移语句时,rn就出现out of memory错误,怎样解决?rn谢谢
android camera out of memory安卓照相机OOM问题的解决
如果不能使用,请修改根目录下的project.property的android:target为你当前有的target(不知道怎么改的同学可以从8到21一个个数字去试哦) 程序实现点击屏幕后聚焦拍照功能,并把图片存入sd卡camera目录下。但打开时无自动聚焦,这个问题有需要的同学可以自己加上去哦。根本原因是解决内存不足问题。
【Android】如何解决bitmap 内存溢出out of memory的问题
很多人在android开发中都遇到了生成bitmap时候内存溢出,也就是out of memory(OOM)的问题,网上对这样的问题的的解决说法不一。笔者作为一个初级开发者,在这里向大家提供一种比较实用,比较易于理解的方法,这种方法不如一些高级开发者提出的方案来的深刻,但是也能帮助大家有效地解决问题。废话不多说了,直接上代码。 BitmapFactory.Options opt = new Bi...
tomcat out of memory 问题
我现在做的一个项目是struts+hibernate架构的rn在大数据量检索时会出现out of memory的error我想捕获这经errorrn以下是代码rn[code="java"]rntryrn session = DBConnection.getSession();//Obtaining hibernate sessionrn rn //run this query and populate the query listrn search_DB = "select * from commonlogs";rn rn query = session.createQuery(search_DB);rnrn for(int i =0; i< params.length; i++)rn rn if(params[i]==null)rn break;rn query.setString(i, params[i]);rn rn rn query.setMaxResults(fetchSize);rn rn [color=red]returnValue = query.list();[/color]rn rn catch(MyException ex)rn throw ex;rn rn catch(Exception ex)rn throw new MyException (ErrorCodes.SQLEXCEPTION,ex);rn rn //start add by sunwei 2009/03/05rn catch (Throwable e) rn logger.writeError(ErrorCodes.NONSPECIFIEDEXCEPTION, ResourceAccess.getErrorMessage(ErrorCodes.NONSPECIFIEDEXCEPTION), e);rn throw new MyException (ErrorCodes.NONSPECIFIEDEXCEPTION,new Exception(e.toString()));//也是输出logrn rn //end add by sunwei 2009/03/05rn finallyrn tryrn rn DBConnection.releaseResources(session);//Closing sessionrn rn catch(MyException ex)rn throw ex;rn rn rn[/code]rn上一层捕获MyException的话,会跳转到GlobalErrors.jsp(错误页面)rnrn[color=red]returnValue = query.list();[/color]执行时会out of memoryrnrnstruts-config.xmlrn[code="java"]rnrn rn rn rn rn rn rn[/code]rn不能输出log,但会跳转到GlobalErrors.jsp(错误页面)rn我用的log机制是log4j,其它异常(比如数据库连接失败等)都会输出log,就是out of memory不能.rn谁能帮我看看是什么原因.n[b]问题补充:[/b]n谢谢大家的回答!rn调高JVM的内在确实可以减少out of memory的发生,这个我以前调查过.rn我说一下这个程序发生out of memory原因:主要是一次从数据库中检索出100万条记录造成的,我也不想这样做查询的,但是程序已经是不能改了,只想知道原因.rn既然throwable不能捕获out of memory这个error,那什么程序又可以跳转到GlobalErrors.jsp(错误页面) 呢?能不能帮我分析一下.已经加分了.n[b]问题补充:[/b]n为什么程序又可以跳转到GlobalErrors.jsp(错误页面) 呢?
SMTP out of memory ?
我的Exchange 2000 有时候发不出去,Foxmail报错说:“SMTP out of memory”,是什么原因啊?怎么解决呢?
out of memory错误
TPerson、ICustomer分别是对人和公司的封装,TPersonalCustomer从它俩继承,封装个人类型的客户(对应的还有公司类型的客户),TPersonalCustomer重载了TPerson类中的Name属性,但是在给Name赋值的时候,却引发了Out of Memory错误,为什么呢?rnrn代码片段:rnrn//// Classes and Interfacerntypern TPerson = class;rn TPersonalCustomer = class;rn ICustomer = interfacern function GetDisplayName: WideString; stdcall;rn property DisplayName: WideString read GetDisplayName;rn end;rnrn TPerson = class(TInterfacedObject, IInterface)rn privatern FName: WideString;rn procedure SetName(const Value: WideString);rn publishedrn property Name: WideString read FName write SetName;rn end;rnrn TPersonalCustomer = class(TPerson, ICustomer)rn privatern FNoshow: Boolean;rn publicrn function GetDisplayName: WideString; stdcall;rn publishedrn property Name;rn end;rnrnimplementationrnrnuses SysUtils,rn Dialogs;rnrnprocedure TPerson.SetName(const Value: WideString);rnbeginrn //ShowMessage(Value);rn FName := Value; <-- out of memory herernend;rnrnfunction TPersonalCustomer.GetDisplayName: WideString;rnbeginrn Result :='客户'+ Name;rnend;rnrnend.rnrnrn////// codes in the formrnrnprocedure TForm1.btn1Click(Sender: TObject);rnvarrn Customer : ICustomer;rnbeginrn Customer := TPersonalCustomer.Create;rn TPerson(Customer).Name := widestring(edt1.Text );rn ShowMessage(Customer.DisplayName);rn Customer := nil;rnend;rnrn
相关热词 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法