由买买提看人间百态

topics

全部话题 - 话题: allocated
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
r********n
发帖数: 1162
1
修改了加上了family based的数据加强对比性。
Recently the USCIS published the data and statistics regarding the
employment based green card visa usage in the first three quarters in FY
2011. We found that the DOS visa office failed to assign enough visa numbers
to the employment based green card applicants in the first three quarters
in FY 2011. The Immigration Law INA 201 specifies that the employment based
green card has a minimum annual quota of 140,000, and not to exceed in any
of the first 3 quarters of any... 阅读全帖
s***r
发帖数: 1121
2
[Your Name]
[Street Address]
[City, ST ZIP Code]
August 14, 2011
[Recipient Name]
[Title]
[Street Address]
[City, ST ZIP Code]
Sub: Employment-based category being treated unfairly from October
2010 to March 2011
Dear Congressman:
I am writing to voice my strong concern about the unlawful discrimination by
DOS in handling the
employment-based green card visa use.
The United States Immigration Law INA: ACT 201 - WORLDWIDE LEVEL OF
IMMIGRATION Sec. 201. [8 U.S.C. 1151] has a strict 27% limitatio... 阅读全帖
d*******g
发帖数: 438
3
Dear XXXX
Thank you for contacting me regarding visa allocations. I appreciate hearing
from you on this important issue.
As you know, each year approximately 140,000 employment-based immigrant
visas are available to qualified immigration applicants, and countries are
held to a numerical limit of 7%o of admissions. Immigrant visas are
distributed during the year on a quarterly basis. Employment-based
preference visas are issued to eligible immigrants in the order in which a
petition has been file... 阅读全帖
s*****c
发帖数: 753
4
来自主题: EB23版 - HR3012 对EB3C的影响
Corrections!
The hr3012 amendments changed the allocation during 过渡期. Now 在过渡期,
设定了任何国家不能拿>85%剩余名额的限制
so the analysis change to:
2012 reserve 15% to ROW, 0.85*0.85=72.25% india, leaves at most 12.75%
to china
2013 reserve 10% to ROW, 0.9*0.85=76.5% india, leaves at most 13.5% to
china
2014 reserve 10% to ROW, 76.5% india, leaves at most 13.5% to china.
still, we should be alarmed that there are no reserved visa number nor
limit for any country after 2014. We can't only look at the visa number
... 阅读全帖
s*******e
发帖数: 629
5
United States: Visa Office Predicts Significant Movement For EB-2 India &
China; But EB-3 India Stuck In Neutral
05 November 2011
Article by Valentine A. Brown
Last week, Charles Oppenheim, the man behind the mysterious Visa Bulletin
curtain, also known as Chief of the Visa Control and Reporting Division of
the Department of State, made some significant predictions regarding
priority date movement in the coming months.
The best news came for Indian and Chinese nationals in the EB-2 category.
Fo... 阅读全帖
a***k
发帖数: 1038
6
来自主题: EB23版 - House's bill HR2131 is out today
It seems that House will go with piecemeal approach, and will separate
illegals from legals.
Key Components of the SKILLS Visa Act:
Increases Green Cards for STEM Grads: The SKILLS Visa Act allocates up to
55,000 green cards a year for employers to petition for foreign graduates of
U.S. universities with advanced degrees in STEM fields.
Supports STEM Education in U.S.: The bill raises the current fee on H-1B
visas and institutes a fee on employers petitioning for green cards for
workers that ... 阅读全帖
F****3
发帖数: 1504
7
我也贡献一个我用的模板吧。
I hereby respectfully request a copy of the documents and/or dataset that
are used to support the visa spillover allocation decision made for Visa
Bulletin for September for EB2. These documents include but don't limit to
legal memo and data that justify a particular allocation decision in
accordance with the INA. For privacy reason, please feel free to redact
information that identifies particular individual applicants. The data I'm
requesting should preferably contain informat... 阅读全帖
c**l
发帖数: 1022
8
请看看有没有用?是套话吧?
Hi,xxx – Sorry for the delay in responding. Here is information provided
by xxx regarding the immigrant visa number allocation for the applicants in
the Employment Third Preference category (EB-3):
The allocation of visa numbers is based on regulations specified in the
Immigration and Nationality Act (INA). The fiscal year 2013 limit for
employment-based preference immigrants calculated under Section 201 of the
INA is 158,466, which is divided into five preference categories. Se... 阅读全帖
j*e
发帖数: 1987
9
Comment:
15. What are the most important policy and operational changes, if any,
available within the existing statutory framework to ensure that
administrative policies, practices, and systems fully and fairly allocate
all of the immigrant visa numbers that Congress provides for and intends to
be issued each year going forward?
Comment: I have been in the Board of Directors and Executive Committee of a
national immigrant organization with thousands of members for many years.
One of the most fru... 阅读全帖
w********i
发帖数: 1721
10
给谁看的?有什么效果?
05/08/2015: Immigrant Community is Anxious to Learn Whether the State
Deparment Implements Immigration Actions to Ensure Use of All Statutorily
Authorized Immigrant Visa Numbers
Immigrant community is more than ever waiting for the release of June 2015
Visa Bulletin to see whether the State Department is implementing immigrant
visa reform mandate of the President Obama. The USCIS has been seeking
stakeholders input on these issues and we have learned that the AILA
recommended to impl... 阅读全帖
y******0
发帖数: 8807
11
Here are the notes from the most recent (August 13th) chat with Charlie
Oppenheim:
QUESTION 1: Last month you were hopeful that EB-2 India/China would hold
steady or possibly advance for September. However both categories have
retrogressed significantly. What caused this to occur?
ANSWER: The September retrogression of EB-2 China and India can primarily be
attributed to skyrocketing demand for EB-2 Worldwide, which has left fewer
numbers available for India and China. Currently, the availability... 阅读全帖
b*****e
发帖数: 53215
12
travel.state.gov > Visas > Law and Policy > Visa Bulletin > Visa Bulletin
For September 2015
Print Email
Visa Bulletin For September 2015
Number 84
Volume IX
Washington, D.C
View as Printer Friendly PDF
A. STATUTORY NUMBERS
1. This bulletin summarizes the availability of immigrant numbers during
September. Consular officers are required to report to the Department of
State documentarily qualified applicants for numerically limited visas; U.S.
Citizenship and Immigration Services in the Depa... 阅读全帖
y******0
发帖数: 8807
13
来自主题: EB23版 - yoyo呢????
这是8月份奥本和AILA定期开会的问答内容:
也就是说烙印2类在2014年10月份的排期前进到2009年就是一个试点,接下来在剩下的
11个月基本不动。
Negative impact也指出来了。
总结一下就是在第一个月大进,后面长时间后退,然后不动。好处就是名额一下子就释
放出来了,坏处就是用完就用完了,最后看年底有没有SO。这样做保证不浪费,但是想
unexpected吃超就没有可能了。
你可以看看去年烙印2类一年的排期走势。
Some changes have already been implemented.
As stated in the Visa Modernization proposal, members may see more
aggressive cut-off date movements for some preference categories earlier in
the year. Similar movement occurred earlier this year with regard to EB-2
India; advancement of... 阅读全帖
d****n
发帖数: 12461
14
39:4-88. Traffic on marked lanes
When a roadway has been divided into clearly marked lanes for traffic,
drivers of vehicles shall obey the following regulations:
a. A vehicle shall normally be driven in the lane nearest the right-hand
edge or curb of the roadway when that lane is available for travel, except
when overtaking another vehicle or in preparation for a left turn.
b. A vehicle shall be driven as nearly as practicable entirely within a
single lane and shall not be moved from that lane u... 阅读全帖
c*****r
发帖数: 8227
15
关键是这钱会用到哪里?
一言以蔽之:填退休金造成的州赤字的无底洞!“So any money allocated to
schools will merely backfill the teachers' pension fund.”
摘要:
1. 未必增收
As the Analyst cautions, due to huge swings in the investment incomes of top
earners and "the uncertainty of their responses to the rate increases, the
revenues raised by this measure are difficult to estimate."
2. 只拿教育经费开刀
Mr. Brown has threatened to "trigger" $5.9 billion in education cuts if his
initiative fails, but he'd make less than $100 million in other trims.... 阅读全帖
c*****r
发帖数: 8227
16
关键是这钱会用到哪里?
一言以蔽之:填退休金造成的州赤字的无底洞!“So any money allocated to
schools will merely backfill the teachers' pension fund.”
摘要:
1. 未必增收
As the Analyst cautions, due to huge swings in the investment incomes of top
earners and "the uncertainty of their responses to the rate increases, the
revenues raised by this measure are difficult to estimate."
2. 只拿教育经费开刀
Mr. Brown has threatened to "trigger" $5.9 billion in education cuts if his
initiative fails, but he'd make less than $100 million in other trims.... 阅读全帖
m*******l
发帖数: 621
17
来自主题: SanFrancisco版 - 股市债市投资经验小结 (转载)
【 以下文字转载自 Stock 讨论区 】
发信人: maizegirl (叮当), 信区: Stock
标 题: 股市债市投资经验小结
发信站: BBS 未名空间站 (Sat Jul 13 11:49:58 2013, 美东)
广告:请大家顺便支持一下我们第一篇发表的文章
http://seekingalpha.com/article/1526532-a-chinese-perspective-o
1. 为什么要写这篇文章
从2012年5月 开始重新进入美国股市、债市,到现在刚刚满一年。一直想写一点自
己投资的心里历程。一来感谢我的投资启蒙老师(M老师),二来也提供一些经验教训
给和我一样在投资路程上摸索的新手。
2. 复利效应和股场初试
我们对投资重新开始感兴趣,主要是两个原因。一是因为M老师一直以来将他的投
资理念蕴含在和我们闲聊的过程中。现在回头想想,真是辜负和浪费了许多M老师的投
资机会。尤其是听M老师聊在2008年金融危机时的经历,让我们对投资有了一个全新的
认识。原来投资还是有可能“有章可循”。
第二个原因,是对复利效应和追求经济独立... 阅读全帖
c*********l
发帖数: 3438
18
【 以下文字转载自 JobHunting 讨论区 】
发信人: advancedhei (高级嘿), 信区: JobHunting
标 题: 刚刚和L的同胞电面完, 觉得是个很好的故事
发信站: BBS 未名空间站 (Thu May 14 14:25:31 2015, 美东)
国人哥们主面, 小印跟班. 面Backend infra
给了一道这样的题
/*
Question Description: You are to write an abstraction layer for a persistent
buffer. Provide an implementation of the following abstract class:
*/
public abstract class pBuffer {
protected final int BLOCK_SIZE = 1024;
protected final int BLOCK_COUNT = 1024;
protected byte[] buffer = new byte[BLOCK_COUNT * BLOCK_... 阅读全帖
b******t
发帖数: 965
19
Approaches
No International Stocks
Warren Buffett does not recommend international stocks to ordinary investors
. He has previously recommended us to “Buy American.” In his 2013 annual
letter to shareholders, he suggested a portfolio of 90% S&P 500 and 10%
short-term government bonds to investors.
Of course, many of his holdings — such as Apple, Coca-Cola, and Proctor and
Gamble — do significant business overseas. So many of the factors that
influence the movements of international stocks — curr... 阅读全帖
c*********l
发帖数: 3438
20
【 以下文字转载自 JobHunting 讨论区 】
发信人: advancedhei (高级嘿), 信区: JobHunting
标 题: 刚刚和L的同胞电面完, 觉得是个很好的故事
发信站: BBS 未名空间站 (Thu May 14 14:25:31 2015, 美东)
国人哥们主面, 小印跟班. 面Backend infra
给了一道这样的题
/*
Question Description: You are to write an abstraction layer for a persistent
buffer. Provide an implementation of the following abstract class:
*/
public abstract class pBuffer {
protected final int BLOCK_SIZE = 1024;
protected final int BLOCK_COUNT = 1024;
protected byte[] buffer = new byte[BLOCK_COUNT * BLOCK_... 阅读全帖
g********0
发帖数: 15010
21
来自主题: WashingtonDC版 - 造反有理----我要造cwh反,不去吃饭!
在你的奉承下,看了一下,
1。 Another method of allocating itemized deductions may be allowed.
Please send your written request along with your completed Maryland return,
a copy of your federal return including Schedule A and a copy of the other
state's return. If the other state does not have an income tax, then submit
a schedule showing the allocation of income and itemized deductions among
the states. The Maryland return must be completed in accordance with the
alternative method requested. This request sh... 阅读全帖
z*****a
发帖数: 3809
22
The schools participating in bowls are required to sell large allocations of
tickets to their fans. Any left over allocated tickets must be paid for by
the schools.
To make things worse, the tickets allocated to the schools are full price
tickets. For bowls that don't sell out, many fans will buy cheap discounted
tickets from other sources instead of buying the full price tickets from
their schools.
l**s
发帖数: 20567
23
http://www.ottawachinesenet.com/forum.php?mod=viewthread&tid=66
本帖最后由 参你一本 于 2014-5-12 15:52 编辑
Overview
a)The intended beneficiary’s financial situation does not match
information provided by the fundraising committee in its public appeal for
donations, i.e., the intended beneficiary’s financial situation does not
justify the need for A public donation campaign. In order to achieve what
the fundraisers INTENDED to achieve (i.e., scamming a large sum of money out
of the public who don’t know the... 阅读全帖
s*******y
发帖数: 46535
24
2345
Financial Aid Program
助学金项目
助学金项目开始于1993年,是基金会推出的第一个资助
项目,也是OCEF最重要的资助项目。 OCEF助学金项目针对中
国贫困地区家庭经济困难的初中、小学生,由OCEF在海外募款
后,直接向受助学生发放人民币资助金,用于弥补受助学生的
学习费用及部分生活费用支出。
Financial Aid Program started in 1993; it was the first aid program offered
by the Foundation and is the most important aid program. Financial Aid Progr
am focuses on junior high and primary school students from financially chall
enged families living in poor areas. Funds are raised overseas and then dist
ributed to students in the f... 阅读全帖
s*******y
发帖数: 46535
25
2345
Financial Aid Program
助学金项目
助学金项目开始于1993年,是基金会推出的第一个资助
项目,也是OCEF最重要的资助项目。 OCEF助学金项目针对中
国贫困地区家庭经济困难的初中、小学生,由OCEF在海外募款
后,直接向受助学生发放人民币资助金,用于弥补受助学生的
学习费用及部分生活费用支出。
Financial Aid Program started in 1993; it was the first aid program offered
by the Foundation and is the most important aid program. Financial Aid Progr
am focuses on junior high and primary school students from financially chall
enged families living in poor areas. Funds are raised overseas and then dist
ributed to students in the f... 阅读全帖
h*******o
发帖数: 4884
26
来自主题: Apple版 - 贴个换SSD 前后的XBENCH对比吧
原来是原装的希捷的硬盘250G
换了OWC SSD Mercury Extreme Pro 的240G,总体印象是没有想像中的那么快,可能是
因为我不是clean install,用得superduper直接的硬拷贝,所以SSD上的系统不是很干
净 ,但是也提升了不少,尤其是launch illustrator/photoshop之类的时候
原来的开机,菊花转25圈半,现在是2圈半,从休眠里起来提升不明显。另外,目前为
止还没有遇到休眠以后唤醒不了的问题
换了SSD以后的374 分数和我late 2009 i7的imac一样了
374+OWC SSD
Results 210.70
System Info
Xbench Version 1.3
System Version 10.6.5 (10H574)
Physical RAM 8192 MB
Model MacBookPro7,1
Drive Type ... 阅读全帖
a****a
发帖数: 5763
27
2011年12月3日,LLVM 3.0正式版发布,完整支持所有ISO C++标准和大部分C++ 0x的新
特性, 这对于一个短短几年的全新项目来说非常不易。
开发者的惊愕
在2011年WWDC(苹果全球开发者大会)的一场与Objective-C相关的讲座上,开发者的
人生观被颠覆了。
作为一个开发者,管理好自己程序所使用的内存是天经地义的事,好比人们在溜狗时必
须清理狗的排泄物一样(美国随处可见“Clean up after your dogs”的标志)。在本
科阶段上C语言的课程时,教授们会向学生反复强调:如果使用malloc函数申请了一块
内存,使用完后必须再使用free函数把申请的内存还给系统——如果不还,会造成“内
存泄漏”的结果。这对于Hello World可能还不算严重,但对于庞大的程序或是长时间
运行的服务器程序,泄内存是致命的。如果没记住,自己还清理了两次,造成的结果则
严重得多——直接导致程序崩溃。
Objective-C有类似malloc/free的对子,叫alloc/dealloc,这种原始的方式如同管理C
内存一样困难。所以Objective-C中的内存管理又增... 阅读全帖
s***e
发帖数: 284
28
来自主题: CS版 - java Class Vector
no. memory allocation only happens when your space is not enough for
new data. it may double each time. say initially its capacity is 10,
when you insert the 11th, it allocate 20 and copy. but later on, you
could insert another 9 numbers without memeory allocation. although
you have to move the second half numbers to the next position when you
insert a number into the middle position.
o****i
发帖数: 1706
29
【 以下文字转载自 Linux 讨论区 】
发信人: ouyadi (可乐会捂帮帮众), 信区: Linux
标 题: Valgrind报uninitialized value was created by a heap allocation
发信站: BBS 未名空间站 (Sat Feb 19 12:11:20 2011, 美东)
程序运行正常,可是在测memery leak的时候报上面那个错,具体错误消息如下:
==25663== Conditional jump or move depends on uninitialised value(s)
==25663== at 0x400C9F: add_edge (graph.c:59)
==25663== by 0x40071A: main (main.c:13)
==25663== Uninitialised value was created by a heap allocation
==25663== at 0x4A0515D: malloc (vg_replace_malloc.c:195)
==256... 阅读全帖
p*p
发帖数: 75
30
来自主题: DotNet版 - C#中的Memory控制
this is about allocation of objects. Objects can be allocated in heap, or on
stacks. if you are familar with C/C++, this concept is quite easy to know. if
you create a object by malloc() or new(),
int* p = malloc(sizeof(int))
the object is on the heap, otherwise, if you define a object in a function,
like
int n
it's on stack.
in C/C++, you have total control on where the objects are allocated. but in
C#, it depends on whether it's a reference type or value type. all primitive
types and s
c******g
发帖数: 63
31
用的是VM player 5.02。一开始硬盘设置为20G, 现在想扩成30G。Power off后在
Utility菜单中已经将大小改为30G,按照网上一些资料的说明,剩余的步骤便是在
Ubuntu系统内部增加disk partition的大小。但似乎中间结果和网上写的有些不一样,
导致无法继续。具体过程如下:(assume所有命令都在sudo下)
$ fdisk /dev/sda 然后输p,显示:
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 39845887 19921920 83 Linux
/dev/sda2 39847934 41940991 1046529 5 Extended
/dev/sda5 39847936 41940991 1046528 82 Linux swap / Solaris
输出n建一个新分区,显示:
Partition type:... 阅读全帖
a**a
发帖数: 416
32
来自主题: Programming版 - a question about virtual memory
It is due to the allocation algorithm and the allocation pattern of your
program. In some algorithms, memories are organized in pages where one
page is the allocation unit for one request. Therefore, even a single
byte could consume 4k bytes in some program. In this way, the memory
could be exhausted very quick.
n*****e
发帖数: 17
33
来自主题: Programming版 - effective C++里的memory pool 一问:
里面写了个pool class的interface, 请问它的constructor该怎么实现:
interface 如下:
class Pool {
public:
Pool(size_t n); // Create an allocator for
// objects of size n
void * alloc(size_t n) ; // Allocate enough memory
// for one object; follow
// operator new conventions
// from Item 8
void free( void *p, size_t n);
t****t
发帖数: 6806
34
来自主题: Programming版 - 几个问题

when you need to control the object instantiation, e.g. singleton.
if you don't allocate additional memory explicitly (via new), then no.
compiler will deallocate all implicitly allocated memory, e.g. subobject's
destructor will be executed. if you do allocate, then you will need to catch
whatever exception (using catch (...) ), deallocate whatever memory, then
rethrow the exception.
i*****r
发帖数: 265
35
来自主题: Programming版 - "brk()" 和 mmap() 有什么区别? (转载)
One thing you must be clear is that all mmap and brk do nothing else but
allocate address space (no actual physical page allocated). brk simply play
with heap pointers thus will be more efficient for small allocations. mmap
create additional vma structure for the process (at least for Linux) and
could be more expensive. mmap() could fail to ... there is nothing
guaranteed to be successful.
s*****k
发帖数: 604
36
template
inline _Tp* allocate(ptrdiff_t __size)
{
set_new_handler(0);
_Tp* __tmp = (_Tp*)(::operator new((size_t)(__size * sizeof(_Tp))));
if (__tmp == 0)
{
cerr << "out of memory" << endl;
exit(1);
}
return __tmp;
}
你说的没错但是把第二个参数去掉在这里是没问题的。
上面这段代码编译没问题的。
看看和我原来贴出来的有什么不同,
就是把第二个参数去掉了。
我想了想应该是 template instantilization 时候用到了第二个参数。
比如 _Tp = int
原来的那个模板函数用的只要 allocate(10, (int*)NULL)就可以
正确instantilize了
没有第二个参数的话就要这样用: allocate(10)

't
t****t
发帖数: 6806
37
Nonstatic data members of a (non-union) class declared without an
intervening access-specifier are allocated so that later members have
higher addresses within a class object. The order of allocation of
nonstatic data members separated by an access-specifier is unspecified
(_class.access.spec_). Implementation alignment requirements might
cause two adjacent members not to be allocated immediately after each
other; so might requirements for space for managing virtual f
H****r
发帖数: 2801
38
来自主题: Programming版 - 请教一个C++的考题
The problem:
Create a solution that can manage a variable number of FIFO byte queues,
each with a variable length that is located in a small, fixed amount of
memory.
You cannot use dynamic memory allocation (new, malloc). All memory
allocation must be static. The maximum size allowed for storage of the
queued data is MAX_DATA_SIZE. You may statically allocate as much additional
memory as you choose, but remember that efficiency is important.
On average, while the system is running, there will be
o****i
发帖数: 1706
39
【 以下文字转载自 Linux 讨论区 】
发信人: ouyadi (可乐会捂帮帮众), 信区: Linux
标 题: Valgrind报uninitialized value was created by a heap allocation
发信站: BBS 未名空间站 (Sat Feb 19 12:11:20 2011, 美东)
程序运行正常,可是在测memery leak的时候报上面那个错,具体错误消息如下:
==25663== Conditional jump or move depends on uninitialised value(s)
==25663== at 0x400C9F: add_edge (graph.c:59)
==25663== by 0x40071A: main (main.c:13)
==25663== Uninitialised value was created by a heap allocation
==25663== at 0x4A0515D: malloc (vg_replace_malloc.c:195)
==256... 阅读全帖
t****t
发帖数: 6806
40
来自主题: Programming版 - C++中如何引用模板类中的模板函数
The reason is A::f is a member template. Otherwise it is ok.
[Standard 14.2]
4 When the name of a member template specialization appears after . or -> in
a postfix-expression, or after nested-name-specifier in a qualified-id, and
the postfix-expression or qualified-id explicitly depends on a template-
parameter (14.6.2), the member template name must be prefixed by the keyword
template. Otherwise the name is assumed to name a non-template. [Example:
class X {
public:
template X* alloc(... 阅读全帖
d****n
发帖数: 1637
41
来自主题: Programming版 - C++ Segment Fault
谢谢指正,但是不敢苟同。
1. rewrite the macro: IS_WHILE_SPACE (x) ((x)==' ')
is not difficult. you can change the function behavior outside.
2. You never modify it (char * source), in your code, why does it take the
risk?
3. Mine is C code, not C style in C++. string.h functions works greats with
'\0' terminated strings.
4. It at most allocated mem twice when all char *source are white spaces.
It is easy to read, less care about memory allocation. Modern memory is
big enough now for space/time trade-off.... 阅读全帖
k**********g
发帖数: 989
42
来自主题: Programming版 - How solid it is: c++/c# call Matlab library
If you need to handle large data and your application (not OS) is 32-bit,
you will see memory fragmentation (in the form of premature "out-of-memory"
errors soon.)
When MATLAB calls a C extension, the C extension must return all its data (
states) as a MATLAB output variable. A C extension must not try to remember
its states via global variables because this can create hard-to-fix bugs.
Long-running and batch-processing applications involving MATLAB should
implement application checkpoints: http... 阅读全帖
c******o
发帖数: 1277
43
first we need to ask why we have heap and stack, obviously you can implement
one using the other.
they just different, and stack is faster mostly if you are ok with its cons
copy from else where:
Stack
very fast access
don't have to explicitly de-allocate variables
space is managed efficiently by CPU, memory will not become fragmented
local variables only
limit on stack size (OS-dependent)
variables cannot be resized
Heap
variables can be accessed globally
no limit on memory size
(relatively) sl... 阅读全帖
k***p
发帖数: 115
44
来自主题: Programming版 - 请教boost::any compile错误。
我的compiler是gcc 4.7。 多谢
$g++ testAny.cpp -o testAny
testAny.cpp: In function ‘void AnyTesting3()’:
testAny.cpp:66:54: error: no match for ‘operator=’ in ‘myPropertySet.std:
:map<_Key, _Tp, _Compare, _Alloc>::operator[], boost
::any, std::less >, std::allocator std::basic_string, boost::any> > >((* & std::basic_string(((
const char*)"BarrType"), (*(const std::allocator*)(& std::allocator<
char>()))))) = (BarrierType)... 阅读全帖
e***t
发帖数: 78
45
来自主题: Programming版 - TabBarController的问题求教
谢谢回复!
之后我在网上查了一下怎么用程序动态的改变这些Item
主要都是在AppDelegate.m里的
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary
函数里加类似
...
OptionsViewController *ovc = [[OptionsViewController alloc]
initWithStyle:UITableViewStyleGrouped];
UINavigationController *ovc_nc = [[UINavigationController alloc]
initWithRootViewController:ovc];
[tabItems addObject:ovc_nc];
[ovc release];
[ovc_nc release];
UITabBarController *tbc = [[UITabBarController alloc] init... 阅读全帖
D********g
发帖数: 30
46
来自主题: Programming版 - 请教,call c++ shared lib in java via jni
In this case, you want to delete result, not delete localref.
So just use:
delete result;
Why?
Because result points to an object that is locally allocated in native
method, this is not managed by VM and only with native method itself. So you
want to free up memory upon exit from the native method. Otherwise, memory
leaks! However, for the local reference, you don't have to worry about that
since it is automatically freed upon exit from native method. See JNI
official docs for more information:
... 阅读全帖
S*A
发帖数: 7142
47
您老说的是 C++ 吧,和 LZ 问的 java 有点不一样了。
我对 Linux 内核的memory 管理还比较熟悉的,user space glibc
是如何搞就知道不多了。

Free 不是固定大小的 allocation 是如何几条指令处理的?
要和旁边的 area merge 吧,我自己觉得那个不太容易几个
指令搞定。如果是 alloc/free 固定大小的 allocation,
那个很容易几个指令搞定。
你 override 了 C++ 的 “new”?这个好想是很麻烦的事情,有些
时候一些lib free memory 的时候去调用系统的 free 而不是你自
己的那个 free 然后就悲剧了。我以前碰到过这种情况,非常恶心。
你是如何解决的?

发帖数: 1
48
来自主题: Programming版 - 關於JVM多線程的內存分配
我不知道我理解的對不對,請高手幫忙澄清:
JVM裡內存有兩種分配方式:
1. Java object分配內存,也就是java new,首先使用手動cpu優化版本的new:
hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp TemplateTable::_new()在TLAB
上分配;如果失敗,就去自動編譯的hotspot/src/share/vm/interpreter/
interpreterRuntime.cpp InterpreterRuntime::_new,這裡可能有鎖,性能低。而且
可以被GC回收,應該是managed內存。
2. JVM內部Cpp datastructure native memory allocation,一般C2 compiler做JIT時
需要分配內存,然後JVM會調用arena,arena裡面有chunkpool,裡面的chunk不夠用需
要重新分配時,會調用malloc,並用ThreadCritical的pthread_mutex_lock做保護。例
如:hotspot/src/share/vm/me... 阅读全帖
a******e
发帖数: 95
49
来自主题: Unix版 - 数组大小问题请教
important point: the default size of stack in VC is only 1Mb.
Excerpt from MSDN:
/STACK (Stack Allocations)
The Stack Allocations (/STACK:reserve[,commit]) option sets the size of the
stack in bytes.
To find this option in the development environment, click Settings on the Pr
oject menu. Then click the Link tab, and click Output in the Category box. T
he Reserve text box (or in the reserve argument on the command line) specifi
es the total stack allocation in virtual memory. The default stack
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)