http://hi.baidu.com/zhangbin101004/item/e459f4d1f818dfbd33db903b

今天囧了啊,在ubuntu挂载的文件夹里面解压数据库,结果linux嫌太大挂掉了直接mount error(12): Cannot allocate memory折腾了好久,终于发现解决办法:

方法一:

------------------------------------------------------------------------------------------------------------------------------------------

http://blog.csdn.net/strategycn/article/details/7917082

当通过mount.cifs命令对windows下的文件进行映射时,若文件太大,便会产生这种错误,解决方法是:

修改注册表 HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters\IRPStackSize项的值大于等于15,若IRPStackSize项不存在,就新建一个DWORD值,点击弹出窗口的的进制为十进制,值写个18就ok了,还要重启一下。

-------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------detail-----------------------------------------------------------------------------------

http://linux.derkeiler.com/Newsgroups/comp.os.linux.networking/2006-10/msg00629.html

Check the Event Log on the Windows machine(

  1. 单击“开始”,然后单击“控制面板”。单击“性能和维护”,再单击“管理工具”,然后双击“计算机管理”。或者,打开包含事件查看器管理单元的 MMC。
  2. 在控制台树中,单击“事件查看器”。 

    应用程序日志、安全日志和系统日志显示在“事件查看器”窗口中。

) that fails to allow it's share 
to be mounted under System. Look for a red X, and the word Error. The 
Source is Srv. The error will be:

The server's configuration parameter "irpstacksize" is too small for the 
server to use a local device. Please increase the value of this 
parameter.

If you have this error on the Windows machine that fails to have it's 
share mounted, then do the following...

This key in the system registry must be modifed or created:(这个运行regedit)

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer
\Parameters\IRPStackSize

If the key is there, increase it a bit to say 15 or 18. If the key does 
not exist, as in my case, create a new DWORD Valute. Name it 
IRPStackSize. Double click on it to edit the value, put a check on the 
Decimal radio button for the Base so that you can see the parameter value 
as a decimal value and not a hexidecimal value. Give the new key a value 
of 15 and reboot. If that is not enough, raise it a litte to let's say 18 
and then reboot again. The problem is solved. Go mount your samba shares.

方法二

------------------------------------------------------------------------------------------------------------------------------------------

http://cplusplus2012.blog.163.com/blog/static/206676268201322054621392/

转载自: http://blog.chinaunix.net/uid-9185047-id-2973258.html

If you mount a Windows 7 share using Samba/CIFS you may run into “mount error(12): Cannot allocate memory” if you are using very large files on the Windows machine. Looks like in certain situations Windows needs to be told to run as a file server and to expect large files. You can read more details at Large Files are locking up Windows 7 32 bit and 64 bit, but the solution is to make two registry edits and then restart a service:

Set “HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache” to “1″.
Set “HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size” to “3″.
Restart the “server” service.

Once you have done that you should be able to mount the share using a command like “sudo mount -a” or just reboot the Linux machine.

这个问题太纠结了,有时挂载成功了,解压或者编译什么的,有时遇到Cannot allocate memory,就看不到你mount的目录,然后重启ubuntu还是没有,重新手动挂载就报这个错。 有时又没有,说不准这个问题的出现原因。 看来这个才明白。

------------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------details-----------------------------------------------------------------------------------------

还有其他办法没有试过:祝大家好运!

http://jlcoady.net/windows/how-to-resolve-mount-error12-cannot-allocate-memory-windows-share

If you mount a Windows 7 share using Samba/CIFS you may run into “mount error(12): Cannot allocate memory” if you are using very large files on the Windows machine. Looks like in certain situations Windows needs to be told to run as a file server and to expect large files. You can read more details at Large Files are locking up Windows 7 32 bit and 64 bit, but the solution is to make two registry edits and then restart a service:

  1. Set “HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache” to “1″.
  2. Set “HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size” to “3″.
  3. Restart the “server” service.

Once you have done that you should be able to mount the share using a command like “sudo mount -a” or just reboot the Linux machine.

最新文章

  1. linux传输大文件
  2. Android自动截屏小脚本
  3. Java多线程——<一>概述、定义任务
  4. 为什么在Windows有两个临时文件夹的环境变量Temp和Tmp?
  5. NOIP 2011 提高组 计算系数
  6. hdu 4762 && 2013 ACM/ICPC 长春网络赛解题报告
  7. android中的margin和padding
  8. sql 创建临时表
  9. PHP获取图片颜色值
  10. javascipt继承机制(from阮一峰)
  11. Copley-STM32串口+CANopen实现双电机力矩同步
  12. 用TCP IP从C#实时传数据到Matlab
  13. 如何使用命令从linux服务器下载文件到windows
  14. css position相对定位与绝对定位彻底搞懂
  15. Python + Selenium + AutoIt 模拟键盘实现另存为、上传、下载操作详解
  16. cocos2d-x JS 开启远程代码调试
  17. codeforces水题100道 第二十四题 Codeforces Beta Round #85 (Div. 2 Only) A. Petya and Strings (strings)
  18. 解决: Connection to https://dl-ssl.google.com refused
  19. time.h time_t
  20. MySQL实战 | 04 为什么要使用索引?

热门文章

  1. A vectorized example
  2. CF1060 E-Sergey and Subway
  3. matlab + c/c++ opencv 混合编程
  4. monokai-background
  5. 20145229《Java程序设计》第四次实验报告
  6. 分享知识-快乐自己:SSH 整合 Demo
  7. hdu 4514 湫湫系列故事――设计风景线(求树的直径)
  8. 问题杂烩(scrollTop/背景透明度动画)
  9. IO - 同步,异步,阻塞,非阻塞 (转帖:http://blog.csdn.net/historyasamirror/article/details/5778378)
  10. 用VLC做流媒体服务器