Hi, Can anyone give me detailed information why we don't need to pass size when using new operator

for example

class A
{
int x;
public:
A()
{
x = 20;
}
}

int main()
{
A *a1 = new A(); // here how does the compiler know how much memory to allocated. Is it the comipler speciality or the new operator ?
}