一 Auto_ptr的使用
1 auto_ptr 拥有权的转移(auto_ptr要求一个只能有一个对象只能有一个拥有者,严谨一无二主)
Std::auto_ptrptr1(new ClassA)
Ptr1拥有new出来的对象
Std::auto_ptrptr2(ptr1)
把控制权交给ptr2此后ptr2就拥有了new出来的对象而ptr1不在拥有它了
2通过赋值实现
Std::aut...
分类:
其他好文 时间:
2015-01-07 11:10:22
阅读次数:
188
#include "iostream"
#include "memory.h"
#include "stdio.h"
#include "limits.h"
typedef int Type;
const int MAXN=15;
const int MIN=INT_MIN;
class stack...
分类:
其他好文 时间:
2015-01-03 11:52:00
阅读次数:
120
limits.conf的格式如下:username|@groupnametyperesourcelimitusername|@groupname:设置需要被限制的用户名,组名前面加@和用户名区别。也可以用通配符*来做所有用户的限制。type:有soft,hard和-,soft指的是当前系统生效的设置值。hard表明系统中所能设定的最大值。soft的..
分类:
系统相关 时间:
2014-12-31 18:42:09
阅读次数:
315
limits.conf文件实际上是linux PAM中pam_limits.so的配置文件,而且只针对于单个会话。 limits.conf的格式如下: domain有好几种格式,具体可以用man limits.conf来查看,不过一般来说,我们都是用的用户名和组名的形式:us...
分类:
系统相关 时间:
2014-12-29 13:26:36
阅读次数:
261
【初始化-limits】init_limits.sh#!/bin/bash
#
#2014/07/15
#增加my-limits.conf
cat<<_LIMIT>/etc/security/limits.d/my-limits.conf
*softnofile65535
*hardnofile65535
*softcoreunlimited
_LIMIT
分类:
其他好文 时间:
2014-12-24 18:36:30
阅读次数:
171
elasticsearch? ulimit: error setting limit 解决: My understanding is that /etc/security/limits.conf applies to login shells - but if you‘ve installed docker via apt-get, it‘s started by Upstart. ...
分类:
其他好文 时间:
2014-12-16 13:38:59
阅读次数:
228
MINI VCI TechStream cablehas become a must-have diagnose tool of Toyota owners and technicians. The downside of this cable is that MINI VCI limits the...
分类:
其他好文 时间:
2014-12-09 15:35:38
阅读次数:
173
在linux 平台如何配置hugepages
名词解释:
memlock - max locked-in-memory address space (KB)
1. 配置 /etc/security/limits.conf
memlock 参数
memlock 略小于物理内存 大于SGA ,假设物理内存为64G 可以这么配置
vi
/etc/sec...
分类:
其他好文 时间:
2014-12-09 00:36:30
阅读次数:
238
一、linux系统支持的最大进程数 限制1:既然系统使用pid_t表示进程号,那么最大进程数不能超过pid_t类型的最大值吧 限制2:使用命令ulimit -u查看系统中限制的最大进程数,我的机器上是65535。/etc/security/limits.conf里面是硬限制,ulimit -u是软限...
分类:
系统相关 时间:
2014-12-08 19:24:56
阅读次数:
206
BP算法推算过程 当加入第$k$个输入时,隐蔽层$h$结点的输入加权和为:\[s_h^k = \sum\limits_i {w_{ih} x_i^k }\]相应点的输出:\[y_h^k = F(s_h^k ) = F(\sum\limits_i {w_{ih} x_i^k } )\]同样,输出层$....
分类:
编程语言 时间:
2014-11-22 15:57:00
阅读次数:
420