由买买提看人间百态

topics

全部话题 - 话题: virtually
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
h****g
发帖数: 71
1
No this problem on G++4.4. I guess it may appear on MSVC.
struct A
{
virtual void f1(){};
virtual void f2(){};
virtual void f3(){};
virtual void f4(){};
virtual void f5(){};
virtual void f6(){};
virtual void f7(){};
virtual void f8(){};
virtual void f9(){};
virtual void f10(){};
virtual void f11(){};
virtual void f12(){};
virtual void f13(){};
virtual void f14(){};
virtual void f15(){};
virtual void f16(){};
virtual void f17(){}
w*******y
发帖数: 60932
2
I searched through the forums and couldn't find this posted anywhere.
Microsoft is still running their Virtualization Challenge:
http://www.microsoft.com/learning/en/us/certification/virtualiz
#tab3" rel="nofollow" target="_blank" onclick="_gaq.push(['_trackEvent', '
thread', 'click', '4127369 - free-voucher-for-microsoft-certification-exam-
70659-mcts-windows-server-2008-r2-server-virtualization']);">Virtualization
Challenge [Virtualization Challenge:
http://www.microsoft.com/learning/en/us/ce... 阅读全帖
w*******y
发帖数: 60932
3
They ran a giveaway at xmas, but now have decided to make the software free
for home users. Cnet / Download.com gave it 5 stars at it's normal retail of
$39.95.
Link:
http://www.trustware.com/
copied the description from the site for the lazy clickers:
How BufferZone Works
The Virtual Zone: Prevention Approach to PC Security
BufferZone creates an isolated environment called the Virtual Zone. The
Virtual Zone "buffers" your PC from all forms of known or unknown attacks
that originate from the Int... 阅读全帖
s*******e
发帖数: 664
4
☆─────────────────────────────────────☆
ttgg (暂时没有昵称) 于 (Fri Jun 26 17:02:17 2009, 美东) 提到:
请教如下C++代码(左边的数字是行号)
为了使用polymorphism的动态榜定
基类函数被定义成virtual
然后子类里不同的实现
这个我能明白
可是问题是
在有些例子里
子类的对应函数同样被加上了virtual关键字,
请问这是为什么?
我看了网上资料
如果基类里有virtual函数
那么这个类的object就会包含virtual table
而它的所有子类obj也自动包含v-table
所以为什么还要加上virtual修饰呢?
01.class Base
02.{
03.public:
04. virtual void function1() {};
05. virtual void function2() {};
06.};
07.
08.class D1: public Base
09.{
10.public:
11. virtual void function1(
r**u
发帖数: 1567
5
【 以下文字转载自 CS 讨论区 】
发信人: raou (raou), 信区: CS
标 题: user virtual address space VS kernel virtual address space
发信站: BBS 未名空间站 (Sun Apr 18 17:14:09 2010, 美东)
32-bit machine,virtual address space 4GB,kernel(e.g. linux)会把这4GB,分成
3GB user/1GB kernel。
1GB kernel virtual address space跟物理内存是1-to-1的map。对user virtual addr
做virtual --> physical 转换是也是转到一个kernel virtual addr再到physical
memory。
那这样不是只能用到1GB physical memory,如果有更多
的就用不到了。windows也有这个机制,好奇这样的话不是加内存都没用?大牛给解释
一下啊
m********1
发帖数: 31
6
来自主题: JobHunting版 - Can we define pure virtual function?
"Effective C++" Meyers mentions a reason for a pure virtual function to have
a body: Derived classes that implement this pure virtual function may call
this implementation smwhere in their code. If part of the code of two
different derived classes is similar then it makes sense to move it up in
the hierarchy, even if the function should be pure virtual.
ISO C++ 12.4 (7):
A destructor can be declared virtual (10.3) or pure virtual (10.4); if any
objects of that class or any derived class are crea... 阅读全帖
r**u
发帖数: 1567
7
【 以下文字转载自 CS 讨论区 】
发信人: raou (raou), 信区: CS
标 题: user virtual address space VS kernel virtual address space
发信站: BBS 未名空间站 (Sun Apr 18 17:14:09 2010, 美东)
32-bit machine,virtual address space 4GB,kernel(e.g. linux)会把这4GB,分成
3GB user/1GB kernel。
1GB kernel virtual address space跟物理内存是1-to-1的map。对user virtual addr
做virtual --> physical 转换是也是转到一个kernel virtual addr再到physical
memory。
那这样不是只能用到1GB physical memory,如果有更多
的就用不到了。windows也有这个机制,好奇这样的话不是加内存都没用?大牛给解释
一下啊
m**********t
发帖数: 385
8
Scientist of lighting application and virtual reality experience
Organization Description:
Philips Research
Philips Research is the source of many advanced developments in Healthcare,Lifestyle and Technology. Building on 90 years’ experience in industrial research and our world-leading patent position, we’re dedicated to
meaningful innovations.
In the healthcare domain,we are enhancing imaging and monitoring systems,as well as exploring innovative personal healthcare. In lifestyle,we’re helping ... 阅读全帖
r**u
发帖数: 1567
9
你怎么就不晓得呢?
Linux, 4GB virtual addr space分成俩块,3GB user virtual addr space,和1GB
kernel virtual addr space。
1GB(严格的说好像是896MB)的kernel virtual addr space跟physical mem是one-to-
one map,above 1GB 用page table转换。在kernel mode可以用3GB user virtual
addr space,在user mode不能用1GB kernel virtual addr space (for protection)。
t******e
发帖数: 2
10
You can either send resume to my email (for quick
response) or post to http://vmware.jobs/palo-alto-ca/mts-virtual-machine-monitor-test-engineer/8DAC1B6C1EA54CE0ABC5A8653939F6AD/job/.
===========================================
Posting Title: MTS - Virtual Machine Monitor Test Engineer
Advertised Location: Palo Alto, CA, US
Job Description
This position is for System Software Engineer in Testing, working on testing
the stability & functionality of the Virtual Machine Monito... 阅读全帖
w***g
发帖数: 91
11
http://www.offers.pnc.com/checking/100_reward/index.html?WT.mc_
Open an Award Winning1 PNC Virtual Wallet with Performance Spend Today
Get a $100 reward with qualifying Direct Deposit and 10 purchases with your
PNC Bank Visa Check Card2
Get Virtual Wallet with Performance Spend for a high-definition view of
your money.
Earn interest on balances and manage checking, short-term savings and
long-term savings all in one place
Enjoy unlimited check writing, free ATMs3 and free Mobile Bank... 阅读全帖
f******k
发帖数: 31
12
来自主题: Fujian版 - Can friendship go virtual? (转载)
【 以下文字转载自 Boston 讨论区 】
发信人: fishbook (咋整呢), 信区: Boston
标 题: Can friendship go virtual?
发信站: BBS 未名空间站 (Sun Apr 1 22:02:02 2007)
Everything is going virtual these days with high speed internet.
1. Teleconferences and web conferences: virtual meetings
2. Virtual teams
3. Virtual classroom training
...
Can friendship go virtual? Can we make friends using just the internet? No
hanging out. No FB events. That is an interesting question, isn't it?
Friendship takes time and efforts to cultivate a
r**u
发帖数: 1567
13
32-bit machine,virtual address space 4GB,kernel(e.g. linux)会把这4GB,分成
3GB user/1GB kernel。
1GB kernel virtual address space跟物理内存是1-to-1的map。对user virtual addr
做virtual --> physical 转换是也是转到一个kernel virtual addr再到physical
memory。
那这样不是只能用到1GB physical memory,如果有更多
的就用不到了。windows也有这个机制,好奇这样的话不是加内存都没用?大牛给解释
一下啊
z****e
发帖数: 2024
14
来自主题: Programming版 - C++ virtual function 问题
public virtual
protected virtual
private virtual
1.都是什么情况下用呢?
2.如果把上面所有virtual都变成 pure virtual又都是什么情况下用呢?
3.对于friend 来讲,调用如上的这么多种virtual,都是什么情况下用呢?
抱歉,问的有点泛泛,有没有相关的讲解资料?谢谢。
p***o
发帖数: 1252
15
来自主题: Programming版 - C++ virtual function 问题
public virtual/public pure virtual: define an interface
protected/private virtual/pure virtual: template method design pattern
use virtual if there exists default behavior, use pure virtual if not
B*******g
发帖数: 1593
16
来自主题: Programming版 - 问个virtual table 的问题
class A{
public:
virtual void f(){}
};
class B: public A
{
virtual void g() {}
};
B objB;
我的理解是以上代码只生成一个v table 里面只有一个函数 A::f()
但如果class B: virtual public A
好像就生成两个v table, 第二个v table 里面是 B::g()
virtual public A中的virtual 到底起到了什么作用?而且如果我comment out B::g()
的话
sizeof(objB) for :virtual pubic A is greater than sizeof(objB) for :pubic
A, 这多余的内存用来干嘛的?
先谢了
l*******y
发帖数: 1498
17
来自主题: JobHunting版 - 问一个c++ virtual base class的问题
If you inherit a base class as virtual, only one subobject of that class
will ever appear as a base class. 下面这个例子:
#include
#include
using namespace std;
class MBase {
public:
int i_base;
virtual char* vf() const = 0;
virtual ~MBase() {}
};
class D1 : virtual public MBase {
public:
char* vf() const { return "D1"; }
};
class D2 : virtual public MBase {
public:
char* vf() const { return "D2"; }
};
// MUST explicitly disambiguate vf():
class MI : public D1, public D2 {
s******n
发帖数: 3946
18
When compiler handles b->func(para1, para2), it assumes the address is like
this
vptr_BClass
B data member 1
B data member 2
The call will be translated like this:
((vptr_BClass*)b)[0] -> func (b, para1, para2)
class C extends B & A, then memory layout is like this:
vptr_AClass
A data member 1
A data member 2
vptr_BClass
B data member 1
B data member 2
When we do B* b= &c, compiler will add offset to skip the A part. So a
later call b->func() can be handled in the same way for all subclass... 阅读全帖
c**********e
发帖数: 2007
19
来自主题: JobHunting版 - Can we define pure virtual function?
On Item 7, page 43 of "Effective C++", Meyers mentioned a situation you want
to use a pure virtual destructor, that is when you want a class to be
abstract but you do not have a virtual function. You can make the destructor
pure virtual.
Meyers claimed: you must provide a definition for the pure virtual
destructor!
Why? simple. The destructor of base class will be called.

have
call
virtual.
r**u
发帖数: 1567
20
恩。好像是VA直接到PA。还是有些地方不明,比如physcial mem 1GB,那这1GB
physical mem已经map了kernel virtual addr space,那user virtual addr space也
会map到这1GB physical mem。那比如1 physical 可能就会map both kernel and user
virtual addr,是这样么? 多谢

virtual
z***e
发帖数: 5393
21
我还是不晓得你说的"kernel virtual addr"是指什么...virtual addr就是virtual
addr,什么叫kernel virtual addr?

user
L*******r
发帖数: 1011
22
MSDN has articles about implementing virtual channel.
Read API descirptions:
WTSVirtualChannelClose Closes an open virtual channel handle.
WTSVirtualChannelPurgeInput Purges all queued input data sent from the client
to the server on a specific virtual channel.
WTSVirtualChannelPurgeOutput Purges all queued output data sent from the
server to the client on a specific virtual channel.
WTSVirtualChannelQuery Returns information about a specified virtual channel.
WTSVirtualChannelRead Reads data fr
g****g
发帖数: 310
23
来自主题: Programming版 - C++中virtual function的性能差是个误解
今天在我的机器上试验了一把,用rdtsc读取了virtual和non-virutal的call所需要的
时间,大约non-virtual快了大约200个CPU cycles。
因为CPU是3GHz的,分析了一下,把virtual变成non-virtual call的性能差异:
如果一个虚函数每秒调用150,000次的话,那么全部改成non-virtual能提升1%的性能。
几乎可以忽略。
B*******g
发帖数: 1593
24
来自主题: Programming版 - 问个virtual table 的问题
virtual不是在join时用的 应该是class B: virtual public A 和class C: virtual
public A.
我知道这个是用来解决diamond problem的。。但是如果我只有一个base一个derived
class时用
virtual和不用virtual有什么区别? 为什么sizeof(derived class)会有不同? 谢了
z***9
发帖数: 696
25
来自主题: Programming版 - 问个virtual table 的问题
yep, "class B: virtual public A 和class C: virtual public A"
sorry, did not remember the exact code, but that is what I meant for virtual
inheritance.
by the way, your question may be compiler implementation dependent. I got the same size of 8 bytes for both with gcc 4.1 on RHEL x86_64. that means there is only 1 virtual pointer in objB, point to a vtbl in class B.
edit:
if I add "int data" to each class, I can see a difference in size (16 vs 32) for using virtual public or not using it. guess a
m******1
发帖数: 19713
26
HRC Virtual Lobby Day for DADT Repeal
By Julie Bolcer
HRC Virtual Lobby Dayx390 (Screengrab) | Advocate.com
The Human Rights Campaign is encouraging people to use online activism
Thursday to participate in a Virtual Lobby Day to repeal the military’s “
don’t ask, don’t tell” policy. The action coincides with in-person
volunteer visits to lawmakers on Capitol Hill.
Virtual participants are encouraged to use e-mails, phone calls, and social
networking tools like Facebook and Twitter to spread the
t*****e
发帖数: 53
27
来自主题: JobHunting版 - a virtual table question by JP morgan
class B : virtual public A {}
class C : virtual public A {}
class D : public B, C {}
all the classes have virtual member function.
Q: how many virtual table pointers does class D have? why?
c**********e
发帖数: 2007
28
来自主题: JobHunting版 - C++ Q21: size of virtual table
#include
class A {
public: virtual ~A() {}
};
class B : public A {
public:
virtual void f() {}
};
Referring to the sample code above, on a typical platform that uses virtual
tables to implement virtual function lookup, what do you expect "sizeof(B)"
to be?
a) 4
b) sizeof(void *)
c) 2*sizeof(void *)
s******n
发帖数: 3946
29
every object will have a pointer to the vtable for each virtual class.
So if an object inherit two virtual classes, it will have two pointers to
the two virutal classes, if this class added new virtual functions, then
this class itself will have a virtual table, so it will totally have three
pointers to vtable.
v*********s
发帖数: 38
30
My manager 急招 USB/sound driver/controller virtualization (Senior/staff).
pls: v*********[email protected]
-----
Job Title: Software Engineer
As a member of the Virtual Devices team, you will be responsible of
designing, developing and maintaining software that virtualizes devices (USB
/Sound/Networking/vRDMA) for all of VMware's products.
Responsibilities
•Involve in virtualizing device-related features in USB/Sound/
Networking/vRDMA throughout the software development cycle, including
require... 阅读全帖
J******n
发帖数: 183
31
Q:In the State of California can the initial street address for your
corporation be a virtual office address? If so, can the virtual office
address also be the initial address for a Not for Profit in the State of
California? Is this a state issue or are there city regulations that have to
be looked at, in this case the City of San Diego? Thanks for any thoughts
A1: Disclaimer: The materials provided below are informational and should
not be relied upon as legal advice.
Yes, a corporation can con... 阅读全帖
z****u
发帖数: 1007
32
来自主题: PhotoForum版 - 关于actual lighting 和virtual lighting
我觉得virtual lighting或者actual lighting本身是无所谓的. actual lighting的好
处在于能有更丰富的细节,因为后期处理无论无何都会丢失细节.比如这两张照片,处理
过程里我为了减色把蓝色channel整个拿绿色替换了.而virtual lighting的好处在于它
能做到很多actual lighting根本不可能实现的效果.比如这个照片里的颜色和对比.峨
而且只要做得足够好能做到让观众看起来又不会觉得过于虚假.而且virtual lighting
的成本显然要少得多.也容易实现. 比如这第2张照片,如果要打灯.需要至少2盏,模特前
上方的照亮她面部,一个小灯打亮猫. 然后还得加上现场的自然光打亮街道. 另外还得
考虑自然光与人工光源的色温,亮度的协调. 会非常复杂. 外拍要打光比studio打光可
麻烦多了
其实做virtual lighting一样是需要考虑现场actual lighting的. 我之所以喜欢在LA
downtown拍摄主要原因就是那里的光线非常好. 尤其在那些高楼之间的小巷里.自然光
会从3个方向射入,顶上,前方,后方..
t*******d
发帖数: 1530
33
来自主题: BuildingWeb版 - W2K3 VPS上装Virtual CDROm
VPS 用的是Windows 2003 Server 64 bit. 想装一个virtual cdrom的软件,试过五,
六种软
件包括DaemonTool, MS Virtual CD, Virtual CloneDrive, MagicISO...无一成功。现在
怀疑是不是商家在OS上做过手脚,disable了某种系统参数导致的。没有virtual cdrom
我买你VPS
干啥子哦。
m******t
发帖数: 99
34
"对user virtual addr 做virtual --> physical 转换是也是转到一个kernel virtual
addr再到physical memory。"
No: User VA -> PA directly.
v*****r
发帖数: 1119
35
On windows NT, here is how it works:
The virtual address space and address translation
As is the case with other Virtual Memory Managers the Windows NT VMM is
responsible for creating the illusion that all processes have exclusive
access to 32-bits (4GB) of physical memory, the reality being all processes
share the same physical memory (up to a maximum of 4GB). The 32-bits of
address space are known as virtual memory because they do not directly
correspond to physical memory, it is the VMM respo
c**e
发帖数: 2558
36
来自主题: DotNet版 - Virtual PC Is Now Free
"Whether Microsoft virtualization technology is an important component of
your existing infrastructure or you're just a Virtual PC enthusiast,
you can now download Virtual PC 2004 Service Pack 1 absolutely free.
Microsoft is also offering the free download of Virtual PC 2007, with
support for Windows Vista in 2007."
http://www.microsoft.com/windows/virtualpc/default.mspx
z**r
发帖数: 17771
37
来自主题: EmergingNetworking版 - 'virtualization' hype
looks like everybody is announcing new products with virtualization, look at
all the new products that cisco launched, Nexus, ASR, ASA, all have
virtualization involved.
virtualization in networking is not new, 8 years ago, Nortel Shasta was able
to support this. This function is very useful for wholesale. If we make the
definition wider, VPN, VLAN, VC .... are all kinda of virtualization
implementations
c***d
发帖数: 996
38
☆─────────────────────────────────────☆
marriott (marriott) 于 (Sun Sep 23 16:45:59 2007) 提到:
好像记得这里讨论过说virtual的是错的。
但是
http://www.codersource.net/published/view/325/virtual_functions_in.aspx
说一定要virtual才行?
☆─────────────────────────────────────☆
thrust (Thrust Jaeina) 于 (Sun Sep 23 16:48:00 2007) 提到:
很明显,你的记忆有问题
destructor不是一定要virtual,但是不virtual常常是错的

☆─────────────────────────────────────☆
OldMonk (old monk) 于 (Sun Sep 23 16:49:38 2007) 提到:
that article didnot say destructor must
s*******u
发帖数: 1855
39
【 以下文字转载自 JobHunting 讨论区 】
发信人: siriusliu (天狼), 信区: JobHunting
标 题: 问题:vptr/vtable for virtual function & vptr/vtable for virtual inheritance, are they the same?
发信站: BBS 未名空间站 (Wed Nov 5 00:58:56 2008)
we know that both virtual function and virtual inheritance have vptr
pointing to vtable. My question is: do they use one SAME table/ptr, or TWO separate table/ptr?
For ex:
z****e
发帖数: 2024
40
来自主题: Programming版 - 老调重弹 virtual destructor
请问,virtual dtor 以后,下面派生子类,派生子类的派生子类,子子孙孙,他们的
dtor都自动virtual 了么?
还是,无论当前类的基类是不是有virtual dtor,只要从当前类,想派生子类,必须把
当前类的dtor显示声明为virtual?
早谢。
t****t
发帖数: 6806
41
来自主题: Programming版 - c++里的函数可不可以是virtual+static
look, virtual and static essentially contradicts each other. a method is
either non-virtual (if it is static), or non-static (if it is virtual). it
can't be both. this is very different from x=x, where x=x is probably
redundant but still makes sense.
now why it's disallowed? because virtual method calls with `this' pointer,
where static method calls without it. however c/c++ function prototype is
unique, so you can't do this.
y**b
发帖数: 10166
42
来自主题: Programming版 - Two questions on virtual destructor
Effective C++ Third Edition 55 Specific Ways to Improve Your Programs
item 7:
Polymorphic base classes should declare virtual destructors. If a class has
any virtual functions, it should have a virtual destructor.
Classes not designed to be base classes or not designed to be used polymorph
ically should not declare virtual destructors.
简单说,虚函数增加了vptr.
c**********e
发帖数: 2007
43
来自主题: Programming版 - Can we define pure virtual function? (转载)
On Item 7, page 43 of "Effective C++", Meyers mentioned a situation you want
to use a pure virtual destructor, that is when you want a class to be
abstract but you do not have a virtual function. You can make the destructor
pure virtual.
Meyers claimed: you must provide a definition for the pure virtual
destructor!
Why? simple. The destructor of base class will be called.
a***a
发帖数: 434
44
【 以下文字转载自 Money 讨论区 】
发信人: Arena (大鲨鱼), 信区: Money
标 题: citi的一个virtual number能用几次
发信站: BBS 未名空间站 (Mon Apr 12 14:17:20 2010, 美东)
在网上买东西,用virtual number,卖家先尝试charge $1
剩下的会晚点charge,那相当于这个virtual再被charge一次,不会通不过吧
Q******e
发帖数: 85
45
来自主题: JobHunting版 - virtual table存在memory的哪块啊?
More effective C++ 说了,通常virtual table is generated in the object file
containing the definition of the first non-inline non-pure virtual function
in that class. 我认为virtual table应该在代码段。
Q******e
发帖数: 85
46
来自主题: JobHunting版 - virtual table存在memory的哪块啊?
Dynamic binding is decided by the actual object type. suppose Base* ptr =
new Derived. ptr actually point to a Derived object and compiler knows it.
Through ptr,we can get virtual table pointer vptr (the code segment address)
of Derived object. When running, the virtual function can be found through
vptr with virtual function index (offset). In that way, we have dynamic
binding.
l*******y
发帖数: 1498
47
kernel virtual address space可以分成2部分。一个是logical adress space, 对应
physical address < 896M的部分,这个部分(Low memory)和physical address只差
一个constant的 offset. 另外一部分是 physical address > 896M的部分kenel不能直
接访问,要做一个mapping 建立page table后才可以访问。
kmalloc返回的地址就是 logical adress, physical contiguous, 这个部分地址不用
page table.
vmalloc返回的 kernel virtual address是 virutal contiguous, 要建page table
1G以上的memory是可以用到的,把暂时不用的page mapping保存一下,然后去map 别的
部分就可以了。
Linux是这样的,Windows不知道是什么样子。
r**u
发帖数: 1567
48
多谢多谢。也就是说kernel只能用到up to 1GB physical mem,但是user process可以
用到more than 1GB是吧。
还有一个困惑的地方,比如物理内存少于1GB,这种情况是啥样的?user virtual addr
和 kernel virtual addr会map到同一个physical mem frame?
l*******y
发帖数: 1498
49
少于896M的话,我觉得所有的 physical address都能被kernel直接访问,都有logical
address.
user virtual addr 和 kernel virtual addr 应该可map到同一physical page吧,如
果kernel 想访问的话。
当user app 执行write或者read时,会通过相应system call 进入kernel mode,这个
时候kernel 应该直接用user app的page table 就可以了吧。我也不确定,我自己理解
的。。。

addr
c**********e
发帖数: 2007
50
来自主题: JobHunting版 - C++ Q40: virtual destructor (C2)
Which one of the following statements is correct?
a) A virtual destructor is required in any class with pure virtual member
functions.
b) A base class must have a virtual destructor when someone uses a base
class pointer to delete a derived class object.
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)