What is internal implementation of make(map[type1]type2) in Golang? : <p>Golang is a native programming language. So there is a lot of limitation than dynamic languages (like python and ruby).</p>

<p>When initialize Maps as <code>m := make(Map[string]int)</code>, this map <code>m</code> seems to be able to contain infinity many key-values.</p>

<p>But when initialize Maps with maps literal or make with cap, The maps cannot contain infinity many key-values.</p>

<p>Some article said that make without cap allocate a huge amount of memory to this map. But this is not option, because if it was true, there will be a giant memory consumption when initialize single map. But no matter what computer hardware monitoring tools I use, the memory is no difference between before and during my program runs.</p>

<pre><code>
func main(){
    Hello()
}

func Hello(){
    m := make(SizeRecord)
    l := 10000000
    for i := 0; i &lt; l; i++ {
        m[strconv.Itoa(i)] = Size{float64(rand.Intn(100)), float64(rand.Intn(100)), float64(rand.Intn(100))}
    }

    fmt.Println(m)
}
</code></pre>

<p>The program take a while to be executed.</p>

<p>I also read an article <a href="https://blog.golang.org/go-maps-in-action" rel="nofollow noreferrer">Go maps in action</a>, it said (I don't know if I have understood correctly) that make without cap use an alternative implementation to represent map and use an unified interface to access the map as the other maps with limited capacity.</p>

<p>If my understanding is wrong, could any body tell me what correct one is?</p>

<p>If I am correct, why didn't golang implement all maps in this way?</p>
